[issue12490] Documentation for itertools.chain.from_iterable is incorrect

2011-07-04 Thread Rodolpho Eckhardt

New submission from Rodolpho Eckhardt :

The documentation at 
http://docs.python.org/py3k/library/itertools.html#itertools.chain and 
http://docs.python.org/library/itertools.html#itertools.chain is inconsistent.

At the definition of the class it states that itertools.chain.from_iterable can 
receive one iterable "Gets chained inputs from a single iterable argument that 
is evaluated lazily.", but then it contradicts itself by using the following 
example:

@classmethod
def from_iterable(iterables):
# chain.from_iterable(['ABC', 'DEF']) --> A B C D E F
for it in iterables:
for element in it:
yield element

This example could lead the reader to believe this alternative constructor can 
receive multiple iterable objects, when in fact it can receive only one.

--
assignee: docs@python
components: Documentation
messages: 139802
nosy: RodolphoEckhardt, docs@python
priority: normal
severity: normal
status: open
title: Documentation for itertools.chain.from_iterable is incorrect
versions: Python 2.7, Python 3.2

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



[issue12490] Documentation for itertools.chain.from_iterable is incorrect

2011-07-04 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

My mistake reading the documentation.
Sorry, closing this issue.

--
status: open -> closed

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



[issue12490] Documentation for itertools.chain.from_iterable is incorrect

2011-07-04 Thread Rodolpho Eckhardt

Changes by Rodolpho Eckhardt :


--
nosy:  -docs@python
resolution:  -> invalid

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



[issue8078] add more baud constants to termios

2010-11-20 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

Added those baud rates using #ifdef's because I'm not sure all platforms will 
define them.

--
keywords: +patch
nosy: +Rodolpho.Eckhardt
Added file: http://bugs.python.org/file19693/termios_baud.patch

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



[issue10220] Make generator state easier to introspect

2010-11-20 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

This patch adds the getgeneratorstate function and related tests.

--
keywords: +patch
nosy: +Rodolpho.Eckhardt
Added file: http://bugs.python.org/file19705/getgeneratorstate.patch

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



[issue10220] Make generator state easier to introspect

2010-11-20 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

Done, thank you!

Second version attached.

--
Added file: http://bugs.python.org/file19712/getgeneratorstate_v2.patch

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



[issue8525] Small enhancement to help()

2010-11-21 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

Migrated the patch to the 3.x trunk and added three tests.

--
keywords: +patch
nosy: +Rodolpho.Eckhardt, henriquebastos
Added file: http://bugs.python.org/file19748/help_8525.patch

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



[issue7695] missing termios constants

2010-12-11 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

Because these constants might not exist on all platforms, the patch uses 
ifdef's around them.

--
keywords: +patch
nosy: +Rodolpho.Eckhardt
Added file: http://bugs.python.org/file20015/patch_termios_consts_issue7695.diff

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-06-21 Thread Rodolpho Eckhardt

Rodolpho Eckhardt <[EMAIL PROTECTED]> added the comment:

Verified Werneck's patch and it also works on 2.6 and 3.0.

However, the previous code used to present a "friendly" message about
non-numeric ports: "socket.error: nonnumeric port" and now it raises
"ValueError: invalid literal for int() with base 10".

Should it be changed to inform that the exception is due to a
non-numeric port? (Just wrap int(port) with a try and change the raised
exception)

--
nosy: +rodolpho
versions: +Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3427] urllib documentation: urlopen().info() return type

2009-03-29 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

Patch for 2.7.

--
Added file: http://bugs.python.org/file13453/urllib_doc_2.7.diff

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



[issue3427] urllib documentation: urlopen().info() return type

2009-03-29 Thread Rodolpho Eckhardt

Rodolpho Eckhardt  added the comment:

I'm including 2.7, as it also has this documentation problem. The rest
of the documentation is correct.

I know there is still work to be done on Issue 4773, which might affect
this doc.

--
keywords: +patch
nosy: +rodolpho
versions: +Python 2.7
Added file: http://bugs.python.org/file13452/urllib_doc_2.6.diff

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