Thomas Wouters wrote:
> On Thu, Feb 23, 2006 at 05:25:30PM +1300, Greg Ewing wrote:
>
>>As an aside, is there any chance that this could be
>>changed in 3.0? I.e. have the for-loop create a new
>>binding for the loop variable on each iteration.
>
> You can't do that without introducing a whole new
Thomas Wouters wrote:
> __methods__ are methods that should only be
> called 'magically', or by the object itself.
> 'next' has quite a few usecases where it's
> desireable to call it directly
That's why the proposal to replace .next() with
.__next__() comes along with a function next(obj)
whic
Michael Chermside wrote:
> The next() method of iterators was an interesting
> object lesson. ... Since it was sometimes invoked by name
> and sometimes by special mechanism, the choice was to use the
> unadorned name, but later experience showed that it would have been
> better the other way.
Any
On Feb 23, 2006, at 6:12 PM, Facundo Batista wrote:
> Python Argentina finally have T-Shirts (you can see a photo here:
> http://www.taniquetil.com.ar/plog/post/1/161).
>
> Why this mail to python-dev? Because the group decided to give some,
> as a present, to some outstanding members of Python:
Walter Dörwald writes:
> I always thought that __magic__ method calls are done by Python on
> objects it doesn't know about. The special method name ensures that it
> is indeed the protocol Python is talking about, not some random method
> (with next() being the exception). In the defaultdict case
Python Argentina finally have T-Shirts (you can see a photo here:
http://www.taniquetil.com.ar/plog/post/1/161).
Why this mail to python-dev? Because the group decided to give some,
as a present, to some outstanding members of Python:
Guido van Rossum
Alex Martelli
Tim Peters
Fredrik Lund
Stephen J. Turnbull wrote:
> Please define "character," and explain how its semantics map to
> Python's unicode objects.
One of the 65 abstract entities referred to in the RFC
and represented in that RFC by certain visual glyphs.
There is a subset of the Unicode code points that
are conventionall
Guido van Rossum wrote:
> On 2/22/06, Michael Chermside <[EMAIL PROTECTED]> wrote:
>> A minor related point about on_missing():
>>
>> Haven't we learned from regrets over the .next() method of iterators
>> that all "magically" invoked methods should be named using the __xxx__
>> pattern? Shouldn't
On Wed, Feb 22, 2006 at 01:13:28PM -0800, Michael Chermside wrote:
> Haven't we learned from regrets over the .next() method of iterators
> that all "magically" invoked methods should be named using the __xxx__
> pattern? Shouldn't it be named __on_missing__() instead?
I agree that on_missing sho
On Wed, Feb 22, 2006 at 10:29:08PM -0500, Barry Warsaw wrote:
> d.getdefault('foo', list).append('bar')
> Anyway, I don't think it's an either/or choice with Guido's subclass.
> Instead I think they are different use cases. I would add getdefault()
> to the standard dict API, remove (eventually)
On Thu, Feb 23, 2006 at 05:25:30PM +1300, Greg Ewing wrote:
> Samuele Pedroni wrote:
>
> > If you are looking for rough edges about nested scopes in Python
> > this is probably worse:
> >
> > >>> x = []
> > >>> for i in range(10):
> > ... x.append(lambda : i)
> > ...
> > >>> [y() for y in x]
On 2/22/06, Michael Chermside <[EMAIL PROTECTED]> wrote:
> A minor related point about on_missing():
>
> Haven't we learned from regrets over the .next() method of iterators
> that all "magically" invoked methods should be named using the __xxx__
> pattern? Shouldn't it be named __on_missing__() in
On 2/20/06, Mark Mc Mahon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> It seems that the Path module as currently defined leaves equality
> testing up to the underlying string comparison. My guess is that this
> is fine for Unix (maybe not even) but it is a bit lacking for Windows.
>
> Should the path clas
On 2/22/06, Almann T. Goo <[EMAIL PROTECTED]> wrote:
> Since the current semantics allow *evaluation* to an enclosing scope's
> name by an "un-punctuated" name, "var" is a synonym to ".var" (if
> "var" is bound in the immediately enclosing scope). However for
> *re-binding* to an enclosing scope's
Phillip J. Eby wrote:
> At 03:49 PM 2/23/2006 +1300, Greg Ewing wrote:
>>Steven Bethard wrote:
>> > And, as you mention, it's consistent
>> > with the relative import feature.
>>
>>Only rather vaguely -- it's really somewhat different.
>>
>>With imports, .foo is an abbreviation for myself.foo,
>>w
On 2/22/06, Neil Schemenauer <[EMAIL PROTECTED]> wrote:
@classmethoddef fromhex(self, data):data = "" '', data)return bytes(binascii.unhexlify(data))If it's to be a classmethod, I guess that should be "return self(
binascii.unhexlify(data))".-j
__
Christos> This isn't feasible, though, so in case we add more Linux
Christos> machines, at least make sure that the libc/gcc combo is not
Christos> one already used in the existing ones.
Maybe include libc/gcc versions in the name or description?
Skip
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Anthony Baxter wrote:
>> I
>> have an Ubuntu x86 box here that can become one (I think the only
>> linux, currently, is Gentoo...)
>
> How different are the Linuxes, though? How many of them do we need?
Actually, w
Greg Ewing wrote:
Fredrik Lundh wrote:
fwiw, the first google hit for "autodict" appears to be part of someone's
link farm
At this website we have assistance with autodict. In addition to
information for autodict we also have the best web sites concerning
dictionary,
On Tue, 2006-02-21 at 22:47 -0600, [EMAIL PROTECTED] wrote:
> Sergey> Historical question ;)
>
> Sergey> Anyone can explain why function timegm is placed into module
> Sergey> calendar, not to module time, where it would be near with
> Sergey> similar function mktime?
>
> Historic
20 matches
Mail list logo