-
-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refer to types.SimpleNamespace in namedtuple documentation #70992
Comments
People often look towards collections.namedtuple when all they actually want is "named attribute" access to a collection of values, without needing a tuple subclass, or positional access. In these cases, types.SimpleNamespace may be a better fit. I suggest adding the following pointer to the top of the namedtuple documentation: """ |
LGTM. I was going to push your sugestion when I saw that you are allowed to push yourself. See my attached patch:
|
Thanks Victor. I'll sort this out this evening when I get to my PC with access to the CPython repo. |
New changeset c3232d1d8ca0 by Paul Moore in branch 'default': |
types.SimpleNamespace is also available on Python 3.5, you may also modify Python 3.5 doc. |
Ah, thanks. I probably did the commit the wrong way round in that case, as I committed to tip. How should I do the commit into 3.5? (I'm also somewhat confused by the fact that hg describes the 3.5 branch as "inactive"...) |
I don't know what "inactive" means in Mercurial. Python 3.5 is
Update to 3.5 (hg up 3.5), transplant your change (hg transplant |
Or if you don't want to use any hg extension: hg update 3.5 (Null merge (hg merge 3.5 and later) is step documented at https://docs.python.org/devguide/faq.html?#how-do-i-make-a-null-merge) |
New changeset 3115b6ce1006 by Paul Moore in branch '3.5': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: