Re: [Python-Dev] difference between diff string implementations

2008-03-15 Thread Guido van Rossum
On Sat, Mar 15, 2008 at 5:54 PM, Neal Norwitz <[EMAIL PROTECTED]> wrote: > This inconsistency goes back to 2.3 at least and probably to the > initial unicode implementation. > > >>> set(dir(u'')) - set(dir('')) > ['isnumeric', 'isdecimal'] > > UserString contains these two methods even though 8

Re: [Python-Dev] difference between diff string implementations

2008-03-15 Thread Gregory P. Smith
Shouldn't isnumeric and isdecimal apply to 8-bit strings as well? Are there localization issues with them that I'm blissfully unaware of? why not just add the methods there for consistency instead? -gps On 3/15/08, Neal Norwitz <[EMAIL PROTECTED]> wrote: > > This inconsistency goes back to 2.3 a

[Python-Dev] difference between diff string implementations

2008-03-15 Thread Neal Norwitz
This inconsistency goes back to 2.3 at least and probably to the initial unicode implementation. >>> set(dir(u'')) - set(dir('')) ['isnumeric', 'isdecimal'] UserString contains these two methods even though 8-bit strings do not. I'm not sure what we should do for 2.6 or 3.0. My preference would

Re: [Python-Dev] No __bases__ in dir()

2008-03-15 Thread Terry Reedy
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | In Py3k, dir() will allow any class to makes its instances special | cases by defining __dir__(). Nice. Then the current special case will become explainable as type.__dir__ excluding type's numerous attibutes, to

Re: [Python-Dev] No __bases__ in dir()

2008-03-15 Thread Guido van Rossum
On Sat, Mar 15, 2008 at 1:11 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > This is because dir() special-cases classes, isn't it? > > Avoiding infinite recursion in dir(type) might be fun if that special > case was removed without due care and attention... I wasn't s

Re: [Python-Dev] [Python-checkins] r61403 - python/trunk/Misc/NEWS

2008-03-15 Thread skip
Nick> %f makes me think femtoseconds :) Not fraction? Nick> Any particular reason we can't use '%u' to align with the Nick> convention of abbreviating microseconds as 'us' when a character Nick> encoding doesn't provide convenient access to the Greek letter mu? Nick> (e.g. AS

Re: [Python-Dev] [Python-checkins] r61403 - python/trunk/Misc/NEWS

2008-03-15 Thread Nick Coghlan
skip.montanaro wrote: > Author: skip.montanaro > Date: Sat Mar 15 17:07:11 2008 > New Revision: 61403 > > Modified: >python/trunk/Misc/NEWS > Log: > . > > > Modified: python/trunk/Misc/NEWS > == > --- python/trunk/Mi

Re: [Python-Dev] No __bases__ in dir()

2008-03-15 Thread Nick Coghlan
Guido van Rossum wrote: > This is because dir() special-cases classes, isn't it? Avoiding infinite recursion in dir(type) might be fun if that special case was removed without due care and attention... Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Problems building python2.4 SRPM on RHEL4 x64

2008-03-15 Thread Eric B.
>>> I appologize if this is not the right place to post this, but searching >>> through the old archives, I ran across the same issue from 3 years ago, >>> but >>> I cannot find the resolution to it. >>> >>> Currently, I am trying to build the python2.4 SRPM from Python.org on a >>> CentOS4.6_x64

Re: [Python-Dev] No __bases__ in dir()

2008-03-15 Thread Guido van Rossum
This is because dir() special-cases classes, isn't it? On Sat, Mar 15, 2008 at 11:09 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Why __bases__ does not appear in dir()? > > > > Is there a good reason for this or should I file a bug? > > __bases__ and several other methods like mro and _

Re: [Python-Dev] No __bases__ in dir()

2008-03-15 Thread Christian Heimes
> Why __bases__ does not appear in dir()? > > Is there a good reason for this or should I file a bug? __bases__ and several other methods like mro and __subclasses__ are defined on the meta class. dir() doesn't list the attributes of the meta class of a class. >>> class C(object): ... pass

[Python-Dev] No __bases__ in dir()

2008-03-15 Thread Facundo Batista
Hi! My head crashed into this: >>> class C(object): ...: pass ...: >>> >>> dir(C) ['__class__', ...] >>> C.__bases__ (,) Why __bases__ does not appear in dir()? Is there a good reason for this or should I file a bug? Thanks! -- .Facundo Blog: http://www.taniquetil.com.ar/plog/

Re: [Python-Dev] Problems building python2.4 SRPM on RHEL4 x64

2008-03-15 Thread Eric B.
""Martin v. Lšwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Eric B. schrieb: >> Hi, >> >> I appologize if this is not the right place to post this, but searching >> through the old archives, I ran across the same issue from 3 years ago, >> but >> I cannot find the resolution

Re: [Python-Dev] Complexity documentation request

2008-03-15 Thread Dimitrios Apostolou
Correcting myself: Dimitrios Apostolou wrote: > Hi, > > I just dug into the source code looking for complexity of set > operations. In the wiki page I documented an interesting finding, that > it is different to do s-t and s.difference(t). It is also interesting it is different to do s-t than

Re: [Python-Dev] Complexity documentation request

2008-03-15 Thread Dimitrios Apostolou
Hi, I just dug into the source code looking for complexity of set operations. In the wiki page I documented an interesting finding, that it is different to do s-t and s.difference(t). It is also interesting that you can do the first only for sets, but the second for every iterable in t. Are t

Re: [Python-Dev] Problems building python2.4 SRPM on RHEL4 x64

2008-03-15 Thread Martin v. Lšwis
Eric B. schrieb: > Hi, > > I appologize if this is not the right place to post this, but searching > through the old archives, I ran across the same issue from 3 years ago, but > I cannot find the resolution to it. > > Currently, I am trying to build the python2.4 SRPM from Python.org on a > C