On Sep 10, 2:13 pm, Terry Reedy wrote:
> Reading the third paragraph out of context, one can miss the restriction
> to built-in objects. I had assumed that the conversion using len(), when
> available, happened prior to the __getitem__ call.
Yes, that's a common misconception. It is probably ba
[Ben Finney]
> I encourage anyone whose messages are munged like that to seek
> correction from their mail service provider, and switch to a different
> one until it's fixed.
The post was typed on a mobile device into the text window on Google
Groups.
It's too bad that inane concerns with newline
In article <87r5gz93sv@benfinney.id.au>,
Ben Finney wrote:
>Neil Hodgson writes:
>>
>> There appear to be deliberate wraps at sentence end or automatic wraps
>> to fit <80 columns.
>
>The automatic wraps in the code presented in the message are wrong. The
>automatic wraps in the bullet point
Neil Hodgson writes:
> There appear to be deliberate wraps at sentence end or automatic wraps
> to fit <80 columns.
The automatic wraps in the code presented in the message are wrong. The
automatic wraps in the bullet point list are, if not wrong, at least
presumably unintended.
I hope that cle
On 10Sep2010 12:46, Daniel Fetchinson wrote:
| > Raymond Hettinger writes:
| >> It doesn't seem to be common knowledge when and how a[x] gets
| >> translated to a[x+len(x)]. So, here's a short info post on how Python
| >> supports negative indices for sequences.
| >
| > Thanks for this. Could yo
Ben Finney:
> For those who think the problem may be with the recipient's software, I
> see the same annoying line-wrapping problems in the archived message
> http://mail.python.org/pipermail/python-list/2010-September/1255167.html>.
That looks well-formatted to me and just the same as I see i
In article <87vd6d84f7@benfinney.id.au>,
Ben Finney wrote:
>Ben Finney writes:
>> Raymond Hettinger writes:
>>>
>>> It doesn't seem to be common knowledge when and how a[x] gets
>>> translated to a[x+len(x)]. So, here's a short info post on how
>>> Python supports negative indices for seque
Ben Finney writes:
> Raymond Hettinger writes:
>
> > It doesn't seem to be common knowledge when and how a[x] gets
> > translated to a[x+len(x)]. So, here's a short info post on how
> > Python supports negative indices for sequences.
>
> Thanks for this. Could you post your messages using a chan
In article ,
Daniel Fetchinson wrote:
>Attribution missing:
>>
>> I encourage anyone whose messages are munged like that to seek
>> correction from their mail service provider, and switch to a different
>> one until it's fixed.
>
>I encourage anyone who has problems with reading various emails,
>
On 9/9/2010 9:37 PM, Raymond Hettinger wrote:
The docs guarantee that Python's builtin sequences implement support
for negative indices (
http://docs.python.org/dev/reference/expressions.html#subscriptions
The relevant paragraphs are
"
For built-in objects, there are two types of objects that
> Raymond Hettinger writes:
>
>> It doesn't seem to be common knowledge when and how a[x] gets
>> translated to a[x+len(x)]. So, here's a short info post on how Python
>> supports negative indices for sequences.
>
> Thanks for this. Could you post your messages using a channel that
> doesn't arbi
On Thu, 09 Sep 2010 18:37:49 -0700, Raymond Hettinger wrote:
> Hello Folks.
>
> It doesn't seem to be common knowledge when and how a[x] gets translated
> to a[x+len(x)]. So, here's a short info post on how Python supports
> negative indices for sequences.
[...]
> Hope you all found this to be i
Ben Finney writes:
> Raymond Hettinger writes:
>
>> It doesn't seem to be common knowledge when and how a[x] gets
>> translated to a[x+len(x)]. So, here's a short info post on how Python
>> supports negative indices for sequences.
>
> Thanks for this. Could you post your messages using a channe
Raymond Hettinger wrote:
> collections.deque('abcde').__getitem__[-2] # extension class, magic
> method
Small nit: You don't mean [square] brackets here, right?
Otherwise, good posting, thank you!
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
--
h
Mark Tolonen:
> It came across fine for me (on much maligned Outlook Express, no less).
Yes, looks fine to me both in Thunderbird (news, not mailing list)
and at Google Groups. There is a single text part with all lines except
an URL easily within 80 columns. Perhaps there is a problem in Ben'
"Ben Finney" wrote in message
news:874ody9w3v@benfinney.id.au...
Raymond Hettinger writes:
It doesn't seem to be common knowledge when and how a[x] gets
translated to a[x+len(x)]. So, here's a short info post on how Python
supports negative indices for sequences.
Thanks for this. Cou
Raymond Hettinger writes:
> It doesn't seem to be common knowledge when and how a[x] gets
> translated to a[x+len(x)]. So, here's a short info post on how Python
> supports negative indices for sequences.
Thanks for this. Could you post your messages using a channel that
doesn't arbitrarily spl
On 7/30/2010 2:16 PM, Mahmood Naderan wrote:
So is it a compiler or interpreter?
Python is a language. It does not 'work' in the sense of your subject
line. CPython is a Python compiler/interpreter, as described. When
loaded, it may be named python.exe, depending on system and
installation.
quot;interprets" the byte code.
>So, it's an interpreter that compiles the code first.
Thanks. I got it.
// Naderan *Mahmood;
From: Stephen Hansen
To: python-list@python.org
Sent: Fri, July 30, 2010 11:13:27 PM
Subject: Re: how python works
On
On 7/30/10 11:16 AM, Mahmood Naderan wrote:
> So is it a compiler or interpreter?
Neither/both, depending on your definition of either word. It does not
compile to machine code: it compiles to byte code (which it then
usually, but not always, stores in a pyc file alongside the py file). It
does no
Mahmood Naderan writes:
> So is it a compiler or interpreter?
There's a compiler that compiles python to bytecode which is then
interpreted. This saves the interpreter from having to re-parse the
code at run time.
So, it's an interpreter that compiles the code first.
--
Burton Samograd
--
So is it a compiler or interpreter?
// Naderan *Mahmood;
From: Burton Samograd
To: python-list@python.org
Sent: Fri, July 30, 2010 10:36:56 PM
Subject: Re: how python works
Mahmood Naderan writes:
> I want to know how python executes a .py file. Someti
Mahmood Naderan writes:
> I want to know how python executes a .py file. Sometimes when I run a
> file, I get an error that there is a syntax error. This shows that the
> parser read and parse the whole file. Sometimes in the middle of the
> run I get an error that another line has problem. So ho
23 matches
Mail list logo