Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80267
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <webmailgroups@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'programmer': 0.03; 'syntax': 0.04; 'argument': 0.05; 'plenty': 0.07; 'wednesday,': 0.07; 'subject:help': 0.08; 'arguments': 0.09; 'conventions.': 0.09; 'explanation': 0.09; 'subject:command': 0.09; 'cc:addr:python-list': 0.11; 'contribute': 0.11; 'python': 0.11; "(i'm": 0.16; '(start,': 0.16; '10:00': 0.16; 'brackets,': 0.16; 'chris,': 0.16; 'itself,': 0.16; 'ivan': 0.16; 'least.': 0.16; 'skip:[ 60': 0.16; 'sorts': 0.16; 'stop)': 0.16; 'subject:description': 0.16; 'symbols': 0.16; 'varies': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'bit': 0.19; 'message-----': 0.19; 'thanks.': 0.20; 'command': 0.22; 'cc:addr:python.org': 0.22; 'instance,': 0.24; 'integer': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'point': 0.28; 'chris': 0.29; 'bigger': 0.30; 'said,': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'asked': 0.31; 'usually': 0.31; 'default,': 0.31; 'explained': 0.31; 'piece': 0.31; 'anyone': 0.31; 'lists': 0.32; 'there.': 0.32; "we're": 0.32; 'text': 0.33; 'url:python': 0.33; 'info': 0.35; 'common': 0.35; 'something': 0.35; 'case,': 0.35; 'more,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'there': 0.35; 'version': 0.36; 'sequence': 0.36; 'url:listinfo': 0.36; "didn't": 0.36; 'url:org': 0.36; 'should': 0.36; 'virtual': 0.37; 'two': 0.37; 'email addr:python.org': 0.37; 'step': 0.37; 'message- id:@gmail.com': 0.38; 'convention': 0.38; 'nov': 0.38; 'subject:needed': 0.38; 'needed': 0.38; 'skip:- 10': 0.38; 'pm,': 0.38; 'little': 0.38; 'subject:': 0.39; 'subject:" ': 0.39; 'mailing': 0.39; 'url:mail': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'future': 0.60; 'tell': 0.60; 'numbers': 0.61; 'range': 0.61; 'first': 0.61; 're:': 0.63; 'more': 0.64; 'afraid': 0.65; 'email name:python-list': 0.65; 'talking': 0.65; 'to:addr:gmail.com': 0.65; 'here': 0.66; 'default': 0.69; 'received:109': 0.72; 'hey,': 0.75; '^_^': 0.84; 'improvement,': 0.84; 'it\xe2\x80\x99s': 0.84; 'stop,': 0.84; 'underneath': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:thread-index :content-language; bh=rbblVolL+gE7GVIJw1FoUEXq7gayi3TLr1paPtifdDY=; b=nAWJJEeVG2N83s68F7DMSsKYrt1VA3FUxMQzh5BNRLE8zUnJZ55nFQHlkj/ufZJJe5 3jcUgornNj4fnJ5gGOfGwmREudHVy3CMz6cEteoOOb9XTwTsdouy/m7v0gAI9dCKAupD 3NPMkQoYRoumiC+RKQuN7LVI9O0fPBjPXP3ZT9XRM+9CIDwp7P6m+7BgG2ZD1yQfrktE H3NsqKldbeBy0LeRfGCkfOnePzyHWIp6XdSSCI98jLEUGBSVHUa20DjaOkqb4GegGkXu 3YK+bwcHNTkUkyTHjEtVw9e6v2yj+RKCBxe+mWFDLg4wg0su4TNIcbkr/7GDDbgjlvkv fpUg== |
| X-Received | by 10.194.246.167 with SMTP id xx7mr19234949wjc.118.1415190760098; Wed, 05 Nov 2014 04:32:40 -0800 (PST) |
| From | "Ivan Evstegneev" <webmailgroups@gmail.com> |
| To | "'Chris Angelico'" <rosuav@gmail.com> |
| References | <000001cff8e7$af51ef30$0df5cd90$@gmail.com> <CAPTjJmpw3qpJhwX=OG6wmkxKHOo8UQqFUc9ojnm0soa+mepnkQ@mail.gmail.com> |
| In-Reply-To | <CAPTjJmpw3qpJhwX=OG6wmkxKHOo8UQqFUc9ojnm0soa+mepnkQ@mail.gmail.com> |
| Subject | RE: Understanding "help" command description syntax - explanation needed |
| Date | Wed, 5 Nov 2014 14:31:56 +0200 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="utf-8" |
| Content-Transfer-Encoding | quoted-printable |
| X-Mailer | Microsoft Outlook 14.0 |
| Thread-Index | AQFqwUtOTiOBaS6IGfXBQmSpnFhEWQI4TBDfnQqiXWA= |
| Content-Language | en-us |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15496.1415190761.18130.python-list@python.org> (permalink) |
| Lines | 64 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1415190761 news.xs4all.nl 2869 [2001:888:2000:d::a6]:56939 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:80267 |
Show key headers only | View raw
Chris, You got my point exactly. ^_^ This is not about a "range" command itself, but those conventions. Thanks. Larry, >> That's what I'm talking about (asking actually), where do you know it from? >>I know it because I've been a programmer for 39 years. I didn't intend to offence anyone here. Just asked a questions ^_^ -----Original Message----- From: Python-list [mailto:python-list-bounces+webmailgroups=gmail.com@python.org] On Behalf Of Chris Angelico Sent: Wednesday, November 5, 2014 14:16 Cc: python-list@python.org Subject: Re: Understanding "help" command description syntax - explanation needed On Wed, Nov 5, 2014 at 10:00 PM, Ivan Evstegneev <webmailgroups@gmail.com> wrote: > range(start, stop[, step]) -> range object > > For instance, how do I need to understand that (start,stop[,step]) > it’s just a three numbers? > > What do those brackets--> [,] mean? The docs for range() in Python 3 do need improvement, as Mark said, although there's a bit more info than you see there. The exact text varies from one version to another, but underneath that first line should be something like: "Return a virtual sequence of numbers from start to stop by step." That should tell you a bit more, at least. As to the brackets, they're a common convention meaning "optional". This is much bigger than Python, so it's not actually explained anywhere. (I've no idea where someone would go to try to find info on these sorts of conventions. It's a little hard to do a Google search for symbols and their usages. But that's what mailing lists like this are for.) You can create a range object with two arguments (start and stop) or three (start, stop, and step). When an argument is optional, it usually has a default, and in this case, the default step is 1 - every integer will be included. Don't be afraid to ask questions. There are plenty of people here who know both Python and C (I'm one of them), and we're happy to help out. And hey, you might find you can contribute a better piece of help text for something, and then we can make it better for every future wonderer :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
RE: Understanding "help" command description syntax - explanation needed "Ivan Evstegneev" <webmailgroups@gmail.com> - 2014-11-05 14:31 +0200
csiph-web