[issue20583] Hide underscored parameters

2014-02-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue20583] Hide underscored parameters

2014-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this issue is based on Nick's intention in msg206515. Since this issue was rejected, my objection against adding new underscored parameters in issue19619 remain in force. -- ___ Python tracker

[issue20583] Hide underscored parameters

2014-02-10 Thread Yury Selivanov
Yury Selivanov added the comment: We can *probably* make a convention, that "dunder" parameters are hidden from the pydoc. like 'func(a, b, *, c, __hidden__=True, __int__=int)' Or simply those that start with '__'. I'd be -0 on that ;) -- ___ Pytho

[issue20583] Hide underscored parameters

2014-02-10 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury: it's a micro-optimization, the slow builtin lookup becomes a fast local > lookup. That's what I thought, thank you. I think we should discourage use of this pattern (at least in the stdlib). There is small to no performance benefit to do that. And if

[issue20583] Hide underscored parameters

2014-02-10 Thread Nick Coghlan
Nick Coghlan added the comment: For context, codecs.CodecInfo now takes an undocumented "_is_text_encoding" keyword-only argument to blacklist codecs from TextIOWrapper, str.encode, bytes.decode etc. Serhiy expressed some concern that users would see that via Pydoc, believe it was a public API, a

[issue20583] Hide underscored parameters

2014-02-10 Thread Georg Brandl
Georg Brandl added the comment: -1 as well. Yury: it's a micro-optimization, the slow builtin lookup becomes a fast local lookup. -- nosy: +georg.brandl ___ Python tracker ___

[issue20583] Hide underscored parameters

2014-02-10 Thread Yury Selivanov
Yury Selivanov added the comment: I'm -1 on this. Yes, there is a convention in Python that _names are kind of private, but it's just a convention, and not everybody follow it. Making this change would just break too many things. As for the code in question: Random.randrange -- why does it ha

[issue20583] Hide underscored parameters

2014-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: They can be explicitly mentioned in docstrings. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue20583] Hide underscored parameters

2014-02-10 Thread R. David Murray
R. David Murray added the comment: This is not universally true. Both namedtuple (for good reason) and email (for not-so-good reasons) have _ parameters that are part of the public API. -- nosy: +r.david.murray ___ Python tracker

[issue20583] Hide underscored parameters

2014-02-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Underscored parameters of functions sometimes are used for different purposes. For example see random.Random.randrange(), subprocess.Popen.__del__() or codecs.CodecInfo.__new__(). These parameters are not a part of public API and should be excluded from he