Skip to content

yehonatanz/konst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

konst

https://travis-ci.com/yehonatanz/konst.svg?branch=master Maintainability

Effortless, meaningless, DRY constants

from konst.string import RED
from konst.symbol import FLOWER

assert RED == 'RED'
assert FLOWER.name == 'FLOWER'

This module supplies dynamic, created-on-import constants without the need for this annoying duplication:

CONSTANT_NAME = 'CONSTANT_NAME'

Supports both string and symbolic constants (immutable, interned objects with no meaning beyond their name and identity).

TODO:
Integer constants - will be supported once I'll figure a method to give them reproducible values

About

Effortless, meaningless, DRY constants

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published