On 7/26/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote:
> On 7/26/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > (Personally
> > I'd like to use strings for the keys since {'TEXT': 'stuff'} is a lot
> > clearer than {1413830740: 'stuff'} when encountered in a debugging
> > session.)
>
> Good ar
On 7/27/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 7/26/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote:
> > On 7/26/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > > (Personally
> > > I'd like to use strings for the keys since {'TEXT': 'stuff'} is a lot
> > > clearer than {1413830740:
On 7/26/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote:
> On 7/23/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> > For example, one pattern that sometimes comes up in writing methods
> > is that you have a base class that always wants to do something
> > *after* the subclass version of the method i
On 7/27/07, Bob Ippolito <[EMAIL PROTECTED]> wrote:
> 4CCs are not all ASCII, they're Mac OS Roman. This is why in some of
> the C header files the constants turned into integers.
Good to know! We should use that when converting them to Unicode.
--
--Guido van Rossum (home page: http://www.pytho
Why the docstrings for 'dict.values' says "a set-like object ..." ??
>>> list(dict(a=1,b=1,c=1).values())
[1, 1, 1]
--
Lisandro DalcĂn
___
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
Lisandro Dalcin wrote:
> I think it should work in any 2x and 3K. Is this right? Perhaps this
> trick could be used for some automated conversion tool targeting
> backward compatibility with 2.x series.
The backwards compatible version looks like this:
def __iter__(self):
if self =
At 08:25 AM 7/27/2007 -0700, Guido van Rossum wrote:
>Basic GFs, great. Before/after/around, good. Other method
>combinations, fine. But GFs in classes and subclassing? Not until we
>have a much better design.
Sounds reasonable to me. The only time I actually use them in
classes myself is to ove
On 7/27/07, Lisandro Dalcin <[EMAIL PROTECTED]> wrote:
> Why the docstrings for 'dict.values' says "a set-like object ..." ??
>
> >>> list(dict(a=1,b=1,c=1).values())
> [1, 1, 1]
Oops, that's a bug! Thanks for reporting.
Committed revision 56584.
--
--Guido van Rossum (home page: http://www.pyt
Phillip J. Eby wrote:
> I don't know of any quick way to fix that, but I'll give it some thought.
In the meantime, do we want the standard metaclass to complain when it
finds generic functions in class bodies, or to automatically treat them
as static methods?
Cheers,
Nick.
--
Nick Coghlan
It seems the same applies to dict.items() ...
$ set(dict(a=[]).items())
>>> set(dict(a=[]).items())
Traceback (most recent call last):
File "", line 1, in
TypeError: unhashable type: 'list'
On 7/27/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 7/27/07, Lisandro Dalcin <[EMAIL PROTECTED
That's a totally different issue. The result of .items() is a set. But
if it contains an unhashable object you can't convert it to a regular
set.
--Guido
On 7/27/07, Lisandro Dalcin <[EMAIL PROTECTED]> wrote:
> It seems the same applies to dict.items() ...
>
> $ set(dict(a=[]).items())
> >>> set(
Guido van Rossum wrote:
> We could use Unicode strings where in the past we used 8-bit strings,
> but that would be somewhat nasty when there's ever one of these codes
> that's not pure ASCII
Since this is a Mac-specific thing (and Classic-originated at
that), I think you can be pretty sure that a
Ronald Oussoren wrote:
> To reiterate: 4-character-codes in C are numeric literals
I'm still not convinced about that. The major use of 4-char
codes is in data structures stored on disk. I'd be surprised
if they're really stored in the opposite order on little
endian architectures, since then you
13 matches
Mail list logo