Named Tuples 1.9 Python script

SPONSORED LINKS

    Specification

  • Version: 1.9
  • File size: 0 KB
  • File name: 500261
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Python
  • Price:Other Free / Open So
  • Company: Raymond Hettinger (View more)

Named Tuples 1.9 script description:




Publisher review:
Named Tuples script allows you a fast, lightweight attribute-style access to tuples. This script allows you a fast, lightweight attribute-style access to tuples. It contains a function that returns a new subclass of tuple with named fields.

The principal features are:
- Easy to type/read/modify function signature: NamedTuple('Person', 'name age sex height nationality')
- C-speed attribute lookup using property and itemgetter.
- No instance dictionary means that instances take no more space than a regular tuple.
- Nice docstring is helpful with an editor's tooltips.
- Optional keywords in the contructor for readability and to allow variable order of specifying arguments: Person(name='susan', height=60, nationality='english', sex='f', age=30).
- Key/Value style repr for clearer error messages and for usability at the interactive prompt.
- Named tuples are picklable.
- Clean error messages for missing or misnamed arguments.
- A method similar to str.replace() using a field name (used instead of slicing for updating fields -- instead of t[:2] newval t[3:], write t.replace('f',newval)).
Named Tuples 1.9 is a Python script for Programming Methods and Algorithms scripts design by Raymond Hettinger. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
allows you a fast, lightweight attribute-style access to tuples.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5