Hi,
given below is my interaction with the interpreter In one case, i
have created the class method using the "famous idiom"... and in the
other, i have tried to create it outside the class definition... why
isn't the latter working ? (of course, the presence of decorators is a
different issue
You see,
The seen behavior is due to the result of python's name
binding,scoping scheme.
Let me give you an example,
class A:
i=0
def t(self):
print self.i
self.i=4
then
a=A()
a.i is 0
a.t()
then,
A.i is 0
a.i is 4
In the function, it first searches fo
Hi,
Though out of the streamline, I find your post to be one of the most
reasonable and well-formed arguments I have read in a long time. Keep
it up. Great work.
Steven D'Aprano wrote:
Real standards, like TCP/IP which is the backbone of the Internet,
aren't
controlled by any one company. Anyone
hey,
did u read my reply fully? i too feel that this matter of raising
unbound local error in one case and not raising it in the other must be
analysed...
quoting from the documentation
"If a name binding operation occurs anywhere within a code block, all
uses of the name within the block are tr
Again (blink) quoting from the docs "
For targets which are attribute references, the initial value is
retrieved with a getattr() and the result is assigned with a setattr().
Notice that the two methods do not necessarily refer to the same
variable. When getattr() refers to a class variable, setatt
Cool,
i got it now... accessing thru attribute reference always
returns a bound or unbound method... so, D.f is an unbound method
whereas i want the "function" of the unbound method... ok, this
example and the nice explanations definitively thought me about
function, bound method (for
hotbits hotbits hotbits!
http://www.fourmilab.ch/hotbits/
based on quantum mechanics check it out!
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
can some one properly explain the differences between class types and
classic classes? ... Still face problems in identifying what is what.
--
http://mail.python.org/mailman/listinfo/python-list
Dear Colin,
Forgive me for this late reply. Your explanation was of great help to
me.
Thank you very much. It was crystal clear.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I would like to know how to change the fill of things we put in a
tkinter's canvas. for example, if i create a rectangle and i would want
to change the fill of the rectangle once it is clicked... can we do
that?
--
http://mail.python.org/mailman/listinfo/python-list
yes, it was a stupid mistake from my part in not pondering over the api
fully. forgive me. anyways, ii was just looking for item configure. (I
was spending all my time searching google rather than reading the api
sincerely. duh...)
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo