Message60983
| Author | belopolsky |
|---|---|
| Recipients | |
| Date | 2006-08-23.18:24:53 |
| SpamBayes Score | |
| Marked as misclassified | |
| Message-id | |
| In-reply-to |
| Content | |
|---|---|
> cat x.py
class X(object):
def __init__(self, x):
self.x = x
print 'creating X(%r)' % x
def __del__(self):
print 'deleting X(%r)' % self.x
class A(object):
x = X('new')
class B:
x = X('old')
> python x.py
creating X('new')
creating X('old')
deleting X('old')
Python 2.4.2 (#2, Jan 13 2006, 12:00:38)
Python 2.6a0 (trunk:51513M, Aug 23 2006, 14:17:11) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-01-20 09:58:57 | admin | link | issue1545463 messages |
| 2008-01-20 09:58:57 | admin | create | |