Skip to content

farizrahman4u/boxyboi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boxyboi

Boxing primitives in python


Boxyboi lets you bind (not really) attributes to primitives like strings and integers while preserving their natural behaviour.

Example

from boxyboi import Box

dude = Box('Abin Simon')
dude.age = 22
dude.github = 'github.com/meain'

print(dude)  # >>> 'Abin Simon'

# `dude` behaves like a `str`:
print(dude.lower())  # >>> 'abin simon'
print(len(dude))  # >>> 10
print(dude.split(' '))  # >>> ['Abin', 'Simon']

About

Boxing primitives in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages