namedtuple.abc - abstract base class + mix-in for named tuples

Category: Python - Miscellaneous

If you need


to define named tuple subclasses (including reusable abstract ones), adding/overriding some methods, in a convenient way;
to have the named tuple ABC (abstract base class) for isinstance/issubclass tests;
or simply would like to define your named tuple classes in a class-syntax-based and DRY way (without repeating type names...)


-- this recipe is for you. Date: 14 April, 2012


Abc - Collections - Dry - Inheritance - Namedtuple - Shortcuts

Homepage: http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/?in=lang-python

Developer: Jan Kaliszewski

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

This is an extension to the abc.

developer Developer: Eric Snow
license License: Freeware
operating systems Operating System: Windows


Abstract Bases Classes in Python provide great features for describing interfaces programmatically.

developer Developer: Eric Snow
license License: Freeware
operating systems Operating System: Windows


Allows for type hierarchies of immutable types by faking inheritance using dict updates and abc's.

developer Developer: Aaron Sterling
license License: Freeware
operating systems Operating System: Windows


My desire was to design a class with defined attributes that when assigned on instances, would expand the instance's functionality.

developer Developer: Danny G
license License: Freeware
operating systems Operating System: Windows


I define a 'Component' as an attribute (typing optional) that instances can assign objects to.

developer Developer: Danny G
license License: Freeware
operating systems Operating System: Windows


ICArtGallery is the script for building an artists ECommerce site where sellers can share art collections, sell them and customers can search and buy arts.

developer Developer: IcloudCenter
license License: PHP License
operating systems Operating System: Not Available


Ruby Collections provides various collection implementations that are not available in the standard ruby library.

developer Developer: files.rubyforge.vm.bytemark.co.uk
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


.

developer Developer: Barry Walker
license License: Freeware
operating systems Operating System: Windows


Encodes or decodes base64-encoded files.

developer Developer: ccpizza
license License: Freeware
operating systems Operating System: Windows