In <mailman.509.1251373513.2854.python-l...@python.org> Jean-Michel Pichavant 
<jeanmic...@sequans.com> writes:

>in foo.py:

>a = 5
>b = a # works fine

>   
>    def foo(self):
>       e = 5
>       f = e  #works fine

>It may be solved by creating the class upon the "class" statement. If 
>the class A object is created, then c is added as a property of that 
>object, there's no problem accession one object property with A.c.

I thought one could implement something like

class A:
    c = 5
    d = __thisclass__.c

But apparently this is a *huge* deal.  I'm not sure if the reason
it is a huge deal is that it is technically difficult to implement,
or that there is an implicit "lie" in having something (__thisclass__)
standing for something else that doesn't yet exist (and the potential
errors that may arise from this "lie" in sufficiently unfortunate
code).  Or maybe something else beyond my noobish ken altogether.

kynn
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to