FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.12] gh-104943: Remove mentions of old Python versions (GH-104945) by miss-islington · Pull Request #104963 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 1 addition & 4 deletions Lib/typing.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ def __new__(cls, typename, bases, ns):
def NamedTuple(typename, fields=None, /, **kwargs):
"""Typed version of namedtuple.

Usage in Python versions >= 3.6::
Usage::

class Employee(NamedTuple):
name: str
Expand All @@ -2732,9 +2732,6 @@ class Employee(NamedTuple):

Employee = NamedTuple('Employee', name=str, id=int)

In Python versions <= 3.5 use::

Employee = NamedTuple('Employee', [('name', str), ('id', int)])
"""
if fields is None:
fields = kwargs.items()
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove mentions of old Python versions in :class:`typing.NamedTuple`.

Back | FazBrowse Home | New Git URL