[issue13352] tutorial section 9.3.3 documentation problem

2011-11-05 Thread Eli Bendersky

New submission from Eli Bendersky :

User report on the docs@ list:

-

http://docs.python.org/tutorial/classes.html#instance-objects

I think the "counter" attribute is mentioned for the first time in the
example code, not "in Instance of MyClass created above", i.e. class
MyClass does not contain "counter" attribute.

"x.counter = 1
while x.counter < 10:
   x.counter = x.counter * 2
print x.counter
del x.counter"

Best Regards,
Jussi Peltonen

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 147137
nosy: docs@python, eli.bendersky
priority: normal
severity: normal
status: open
title: tutorial section 9.3.3 documentation problem
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13352] tutorial section 9.3.3 documentation problem

2011-11-05 Thread Ori Livneh

Ori Livneh  added the comment:

That's exactly the point: in Python, data attributes don't need to be declared 
in the class definition.

--
nosy: +ori.livneh

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13352] tutorial section 9.3.3 documentation problem

2011-11-05 Thread Eli Bendersky

Eli Bendersky  added the comment:

Yep, I agree, Ori.

The paragraph immediately preceding the code sample says:

"Data attributes need not be declared; like local variables, they spring 
into existence when they are first assigned to [...] the following piece of 
code will print the value 16, without leaving a trace"

Which is what the code sample demonstrates.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13352] tutorial section 9.3.3 documentation problem

2011-11-05 Thread Eli Bendersky

Changes by Eli Bendersky :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com