MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / namedtuple

Function namedtuple

Lib/collections.py:288–380  ·  view source on GitHub ↗

Returns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1]

(typename, field_names, verbose=False, rename=False)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 8

inspect.pyFile · 0.90
doctest.pyFile · 0.90
SplitResultClass · 0.90
ParseResultClass · 0.90
sched.pyFile · 0.90
util.pyFile · 0.90
collections.pyFile · 0.85
PointClass · 0.85

Calls 12

setFunction · 0.85
enumerateFunction · 0.85
dictFunction · 0.85
splitMethod · 0.80
isalnumMethod · 0.80
isdigitMethod · 0.80
startswithMethod · 0.80
replaceMethod · 0.45
addMethod · 0.45
formatMethod · 0.45
joinMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected