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
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
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
"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
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
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
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
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
>>> 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
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 _
> 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
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/
""Martin v. Lwis"" <[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
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
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
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
16 matches
Mail list logo