[issue8887] pydoc str works but not pydoc str.translate

2011-07-29 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 68df566cbf92 by Éric Araujo in branch '2.7':
Make “pydoc somebuiltin.somemethod” work (#8887)
http://hg.python.org/cpython/rev/68df566cbf92

--
nosy: +python-dev

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



[issue8887] pydoc str works but not pydoc str.translate

2011-07-29 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset f02a8f906342 by Éric Araujo in branch '3.2':
Make “pydoc somebuiltin.somemethod” work (#8887)
http://hg.python.org/cpython/rev/f02a8f906342

New changeset 91d6cabf77d6 by Éric Araujo in branch 'default':
Merge fix for #8887 from 3.2
http://hg.python.org/cpython/rev/91d6cabf77d6

--

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



[issue8887] pydoc str works but not pydoc str.translate

2011-07-29 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks again for the useful review.

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

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



[issue8887] pydoc str works but not pydoc str.translate

2011-07-20 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage: patch review - commit review
versions:  -Python 3.1

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



[issue8887] pydoc str works but not pydoc str.translate

2011-06-16 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
title: “pydoc str” works but not “pydoc str.translate” - pydoc str works but 
not pydoc str.translate

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



[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-06-10 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I added tests to cover non-existing attributes and updated the code to follow 
your clever suggestion.

--
Added file: http://bugs.python.org/file22319/fix-pydoc-str.translate-3.2.diff

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



[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Turns out the fix is very simple.  Please review.

--
keywords: +needs review, patch
nosy: +ysj.ray
stage:  - patch review
versions: +Python 2.7, Python 3.1, Python 3.3
Added file: http://bugs.python.org/file22149/fix-pydoc-str.translate-3.1.diff

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



[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

The patch looks good.  A nit-pick:

+if len(parts)  0:

Since *parts* is a list, the above can be replaced with simply if parts:.

Also, it seems to me that the new code may produce an AttributeError when given 
invalid name, but locate() function is supposed to return None instead.

I wouder if it would be possible to reuse the try/except logic ing the if 
module clause and simply do something like

if module:
object = module
else:
object = builtins
for part in parts[n:]:
try:
object = getattr(object, part)
except AttributeError:
return None
return object

--

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



[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Since *parts* is a list, the above can be replaced with simply if parts:

Heh, I always use implied truth values and one disagreed with Tarek about this, 
but here if felt more natural to spell out my mind with an explicit  0 
comparison :)

 Also, it seems to me that the new code may produce an AttributeError
 when given invalid name

I didn’t see that, I forgot to test invalid names, since test_pydoc already has 
some checks.  I’ll add tests and see if I can reproduce what you’re hinting at 
(it would be helpful if you could give examples of invalid names: full dotted 
names, method names, class names?).

 I wouder if it would be possible to reuse the try/except logic ing
 the if module clause

Sure, as long as the tests pass I have no preference about the implementation.  
BTW, what’s your opinion on the test I added?  I use render_doc to test name 
resolving, do you think I should also test the command-line pydoc in a 
subprocess or is it okay to have white-box knowledge here?

--

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



[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Fri, May 27, 2011 at 12:23 PM, Éric Araujo rep...@bugs.python.org wrote:
 .. I’ll add tests and see if I can reproduce what you’re hinting at (it would 
 be helpful
 if you could give examples of invalid names: full dotted names, method names, 
 class names?).

I did not try to apply your patch yet, but what I had in mind was
misspelled names like str.transkate.

--

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



[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-02-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Yep, same bug.

Possibly related: #410336 (I have to read it again to make sure).

--

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



[issue8887] “pydoc str” works but not “ pydoc str.translate”

2010-11-27 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee:  - eric.araujo

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



[issue8887] “pydoc str” works but not “ pydoc str.translate”

2010-06-13 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue8887] “pydoc str” works but not “ pydoc str.translate”

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Note that

 help(str.translate)
Help on method_descriptor:

translate(...)
S.translate(table) - str

Return a copy of the string S, where all characters have been mapped
..

but
 help('str.translate')
no Python documentation found for 'str.translate'

--
nosy: +belopolsky

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



[issue8887] “pydoc str” works but not “ pydoc str.translate”

2010-06-03 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

Inconsistent behavior:
pydoc3 str: works
pydoc3 str.translate: doesn’t
pydoc3 builtins.str: works
pydoc3 builtins.str.translate: doesn’t

I think pydoc3 str.translate should work. I’ll be able to try to write a patch 
in some weeks.

--
components: Library (Lib)
messages: 106942
nosy: merwok
priority: normal
severity: normal
status: open
title: “pydoc str” works but not “pydoc str.translate”
type: behavior
versions: Python 3.2

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