Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41858
| References | <CAJQX3DyT53ocRcxW+1+xRWON2wzoAwEEkEO-zFTXBRm_v5KCOQ@mail.gmail.com> |
|---|---|
| Date | 2013-03-26 17:29 +1100 |
| Subject | Re: At a loss on python scoping. |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3720.1364279348.2939.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: At a loss on python scoping. Chris Angelico <rosuav@gmail.com> - 2013-03-26 17:29 +1100
csiph-web