deriving from str
Terry Reedy
tjreedy at udel.edu
Tue Dec 28 01:26:19 EST 2004
More information about the Python-list mailing list
Tue Dec 28 01:26:19 EST 2004
- Previous message (by thread): argument type
- Next message (by thread): deriving from str
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"dataangel" <k04jg02 at kzoo.edu> wrote in message news:41D015C9.3050005 at kzoo.edu... > Paolo Veronelli wrote: > >> I want to add some methods to str class ,but when I change the __init__ >> methods I break into problems Immutable types cannot be changed in __init__. They are initialized in __new__, which is normally invisible. So you have to overide that if you wish to affect the value. Google previous posts for its calling sequence. int, str, tuple, etc do not have __init__ methods since there is nothing more to once instances are initialized. Terry J. Reedy
- Previous message (by thread): argument type
- Next message (by thread): deriving from str
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list