Package: py3traits
Trait support for Python 3Free software: Apache licenseInstallationpip install py3traitsDocumentationhttps://py3traits.readthedocs.org/DevelopmentTo run the all tests run:toxAbout TraitsTraits are classes which contain methods that can be used to extend
other classes, similar to mixins, with exception that traits do not use
inheritance. Instead, traits are composed into other classes. That is;
methods, properties and internal state are copied to master object.The point is to improve code reusability by dividing code into simple
building blocks that can be then combined into actual classes.Read more from wikipedia:http://en.wikipedia.org/wiki/Traits_classLook for examples from examples folder.Changelog1.2.1 (2015-07-08)Added “Motivation” section to documentation to help to discover use cases.1.2.0 (2015-07-08)New feature: Precompiled (builtin) functions can be used with propertiesNew feature: Precompiled (builtin) functions can be used as traitsNew feature: @validation decorator for validating arguments by valueNew feature: Factory class for object creationImproving feature: @type_safe and @type_converted wraps functions properlyFixed homepage link which was pointing to Python 2 versionAdded back the missing github link in documentationDone a major overhaul for the core to better support adding new featuresMany other bigger or smaller improvements1.1.0 (2015-06-13)Improving feature: setproperty does not require all property functionsImproving feature: added name as more convenient way to name the propertyImproving example: examples/property_is_created_into_instance.pyChanging version numbering.1.0.1 (2015-06-12)New feature: Added setproperty convenience functionNew example: examples/property_is_created_into_instance.pyAdded documentationSome refactoring for testabilityAdded new test utility to parametrize testsAdded unit tests1.0.0 (2015-05-25)First official release0.15.0 (2015-05-23)New feature: Alternative syntax added to add_traits functionNew example: examples/composition_in_alternative_syntax.pyNew example: examples/multiple_traits_composed_into_new_class.pyAddes unit tests0.14.0 (2015-05-19)New feature: Setter and Deleter for properties are now supportedNew example: examples/instance_is_composed_from_cherrypicked_property_in_class.pyNew example: examples/instance_is_composed_from_cherrypicked_property_in_instance.pyUpdated example: examples/class_is_composed_from_cherrypicked_property_in_class.pyUpdated example: examples/class_is_composed_from_cherrypicked_property_in_instance.py0.13.0 (2015-04-25)New feature: Decorator type_safe to check function argumentsNew feature: combine_class function takes name for new class as first argumentRefactoring magic.py to look less like black magicImproving errors.py exception class creation to accept custom messagesAdding unit tests0.12.0 (2015-04-22)New feature: Rename of composed traitsCleaning up parts belonging to py2traits0.11.0 (2015-04-18)PEP8 fixesGeneral cleaning for all filesRemoved unused partsRemoved Python 2 code0.10.0 (2015-03-30)Splitting into two projects: py2traits and py3traitsTaking new project template to use from cookiecutter.0.9.0 Bringing back compatibility to Python 2.xSome small clean up too0.8.0 Adding support to private class and instance attributesRedone function binding to include recompilation of the functionLeaving Python 2.x into unsupported state temporarily.0.7.0 Improving usability of the libraryIntroduced new extendable decorator, which adds function to add traits to objectIntroduced new function combine_class to create new classes out of traitsFixed module imports through out the libraryImproved documentation in examples0.6.0 Restructuring into libraryAdded support for py.testPreparing to support toxImproved multiple examples and renamed them to make more senseRemoved the need of having two separate code branches for different Python versions0.5.0 Instances can now be extended with traits in Python 3.xInstance support now similar to classesAdded more examples0.4.0 Completed function binding with examples in Python 2.xSeparate functions can now be bound to classes
- Functions with ‘self’ as a first parameter will be acting as a method
- Functions with ‘cls’ as a first parameter will be acting as classmethod
- Other functions will be static methods.Fixed an issue with binding functions0.3.0 Trait extension support without conflicts for Python 2.xClasses can be extendedInstances can be extendedPython 2.x supported0.2.0 Apache License UpdatedAdded apache 2.0 license to all filesSet the character set as utf-8 for all files0.1.0 Initial Versionprepared files for Python 2.xprepared files for Python 3.x