Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41858 > unrolled thread

Re: At a loss on python scoping.

Started byChris Angelico <rosuav@gmail.com>
First post2013-03-26 17:29 +1100
Last post2013-03-26 17:29 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: At a loss on python scoping. Chris Angelico <rosuav@gmail.com> - 2013-03-26 17:29 +1100

#41858 — Re: At a loss on python scoping.

FromChris Angelico <rosuav@gmail.com>
Date2013-03-26 17:29 +1100
SubjectRe: At a loss on python scoping.
Message-ID<mailman.3720.1364279348.2939.python-list@python.org>
On Tue, Mar 26, 2013 at 5:17 PM, Shiyao Ma <i@introo.me> wrote:
> class A:
>     r = 5
>     def func(self, s):
>         self.s = s
> a = A()
> print(a.r)    # this should print 5, but where does py store the name of r

What do you mean by "the name of r"?

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web