Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74021

Re: Why is it different from the example on the tutorial?

X-Received by 10.236.29.37 with SMTP id h25mr9634236yha.8.1404659028290; Sun, 06 Jul 2014 08:03:48 -0700 (PDT)
X-Received by 10.140.17.75 with SMTP id 69mr447094qgc.1.1404659028275; Sun, 06 Jul 2014 08:03:48 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!w8no6427997qac.0!news-out.google.com!a8ni6411qaq.1!nntp.google.com!i13no6423828qae.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Sun, 6 Jul 2014 08:03:48 -0700 (PDT)
In-Reply-To <21e704ee-648b-423d-8682-11cb310a31a8@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=64.229.140.25; posting-account=SZ_svQkAAACWRFG2bDA-zgq8ILyl4-vo
NNTP-Posting-Host 64.229.140.25
References <f949d1c4-98c4-417f-9abc-58fe72b4c0a0@googlegroups.com> <mailman.11537.1404651349.18130.python-list@python.org> <c8f935e5-cd8f-4589-a70c-b172a985e22b@googlegroups.com> <21e704ee-648b-423d-8682-11cb310a31a8@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <6928b0db-4f08-4279-aa2e-98f5b70fbc22@googlegroups.com> (permalink)
Subject Re: Why is it different from the example on the tutorial?
From rxjwg98@gmail.com
Injection-Date Sun, 06 Jul 2014 15:03:48 +0000
Content-Type text/plain; charset=ISO-8859-1
X-Received-Bytes 3183
X-Received-Body-CRC 1413522183
Xref csiph.com comp.lang.python:74021

Show key headers only | View raw


On Sunday, July 6, 2014 10:18:53 AM UTC-4, Rick Johnson wrote:
> On Sunday, July 6, 2014 8:38:41 AM UTC-5, rxj...@gmail.com wrote:
> 
> > When I get match result:
> 
> > py>pattern='abcd'
> 
> > py>prog = re.compile(pattern)
> 
> > py>string='abcd'
> 
> > py>result = prog.match(string)
> 
> > py>result
> 
> > <_sre.SRE_Match object at 0x6ffffeda5e0> 
> 
> > py>result.group(0)
> 
> > 'abcd'
> 
> > 
> 
> > It looks like 'result' is different from a simple
> 
> > 'counter' variable. I do not yet find the definition of
> 
> > 'result' object. What do you call 'result' object? Where
> 
> > can I find it (what topic would be in a tutorial)? Thanks,
> 
> 
> 
> One of the most powerful features of Python,,, for the
> 
> noob,,, be documentation strings. With Python you need not
> 
> buy expensive books, or venture into seedy and dangerous
> 
> alley ways of the inter-webs, no, all you need to do is do
> 
> that which any young and inexperienced lad would do when he
> 
> finds himself in a troubling situation:
> 
> 
> 
>     YELL FOR HELP!
> 
> 
> 
> The built-in function "help" will answer all your
> 
> questions,,, considering you ask the correct questions of
> 
> course!,,, but always remember the advice of a wise man and
> 
> don't become the "boy who cried wolf" one too many times!

Thanks. I do not want to waste everyone's time. For a jump start, there are
small errors making me frustrating. Your help does help me, confirm the usage
etc. After a basic familiarity, I do not want to post more. I use cygwin Python,
I type help of an object 'result'. It does show up the help content, but it
never quits the help afterwards. It is annoying, and time wasting. (Sorry again,
that problem may be about Cygwin, not Python. Excuse me to mention that here.
Of course, your help post consumes your time. Thanks again.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why is it different from the example on the tutorial? rxjwg98@gmail.com - 2014-07-06 05:13 -0700
  Re: Why is it different from the example on the tutorial? Tim Chase <python.list@tim.thechases.com> - 2014-07-06 07:54 -0500
    Re: Why is it different from the example on the tutorial? rxjwg98@gmail.com - 2014-07-06 06:38 -0700
      Re: Why is it different from the example on the tutorial? Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-06 07:18 -0700
        Re: Why is it different from the example on the tutorial? Roy Smith <roy@panix.com> - 2014-07-06 10:34 -0400
          Re: Why is it different from the example on the tutorial? Chris Angelico <rosuav@gmail.com> - 2014-07-07 00:45 +1000
          Re: Why is it different from the example on the tutorial? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-06 15:47 +0100
          Re: Why is it different from the example on the tutorial? Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-06 08:53 -0700
            Re: Why is it different from the example on the tutorial? Roy Smith <roy@panix.com> - 2014-07-06 12:01 -0400
        Re: Why is it different from the example on the tutorial? rxjwg98@gmail.com - 2014-07-06 08:03 -0700
          Re: Why is it different from the example on the tutorial? Peter Otten <__peter__@web.de> - 2014-07-06 17:46 +0200
          Re: Why is it different from the example on the tutorial? Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-06 09:02 -0700
          Re: Why is it different from the example on the tutorial? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-06 19:29 +0100
          Re: Why is it different from the example on the tutorial? Larry Hudson <orgnut@yahoo.com> - 2014-07-06 13:32 -0700
            Re: Why is it different from the example on the tutorial? rxjwg98@gmail.com - 2014-07-06 13:42 -0700
      Re: Why is it different from the example on the tutorial? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-06 15:25 +0100
  Re: Why is it different from the example on the tutorial? Rustom Mody <rustompmody@gmail.com> - 2014-07-06 09:01 -0700

csiph-web