A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-March/109288.html below:

[Python-Dev] pydoc for named tuples is missing methods

[Python-Dev] pydoc for named tuples is missing methods [Python-Dev] pydoc for named tuples is missing methodsJames Mills prologic at shortcircuit.net.au
Tue Mar 15 03:02:30 CET 2011
On Tue, Mar 15, 2011 at 11:50 AM, Terry Reedy <tjreedy at udel.edu> wrote:
>> How would that work if you had a field named "replace"? I think
>> Raymond's current design is as good as it's going to get.
>
> 'as_dict' is an unlikely fieldname. 're_place' is too, but that just shift
> the '_' from '_replace'. No gain. I might prefer _asdict to _as_dict, but
> not enough to change.

Probably a stupid idea (sorry) but one could just
make asdict() and replace() public methods
with the caveat that developers not use those
as field names.

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4