New submission from Alexey Shamrin <sham...@gmail.com>:

Maybe it's just me, but it took me several attempts  to understand
namedtuple example in the documentation [1]. The problem is that the
first example uses verbose=True. It's very unusual to get Python source
as the output in Python shell. At first I thought there's some syntax
error in documentation source.

I know that several lines above one can read: "If verbose is true, the
class definition is printed just before being built." But during first
several attempts to understand namedtuple, I skipped it and directly
scrolled to the first example.

I think the first example on namedtuple usage shouldn't use verbose=True.

You could argue I had to try using namedtuple inside Python shell. I
agree. But unfortunately Python 2.6 was not installed on the computer I
was at.

[1]: http://docs.python.org/library/collections.html#collections.namedtuple

----------
assignee: georg.brandl
components: Documentation
messages: 91680
nosy: ash, georg.brandl
severity: normal
status: open
title: collections.namedtuple: confusing example
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6722>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to