TG wrote: > Hmm ... I'm definitely not a python wizard, but it seems to be quite a > special case that breaks the rules ...
Yes and no. The primary use case for __new__ was to allow subclassing of immutable types. array.array is not immutable, but it's still a special case, in that it enforce type-based restrictions. I guess that it does so by creating different types based on the typecode (this is low-level, C stuff), so this can only happen in the constructor (the object is already created when the initializer is called). > unpythonic, isn't it ? Not really -> practicallity beats purity !-) But this should definitively be documented. I don't have time to do so right now - anybody willing to take care of this ? -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list