The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.python
From: al...@mail.comcast.net (Alex Martelli)
Date: Sun, 6 Nov 2005 08:12:19 -0800
Local: Sun, Nov 6 2005 11:12 am
Subject: Re: __new__
...
> is as __new__ had left it). Thus, for a new-style class C, the statement Hmmm -- not quite, because in the new-style object model special methods > x=C(23) is equivlent to the following code: > x = C.__new__(C, 23) > x = C.__new__(C, 23) > to comply with the current implementation (I used Python 2.4). are taken from the type, NOT from the instance as the latter is saying. E.g, if you change class B into: class B(A): you'll see that while b.__init__() would print 'from instance', x = C.__new__(C, 23) and this is how I plan to have it in the 2nd edition. Alex You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||