Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

pydanny/strings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strings

Python strings for humans.

Usage:

>>> from strings import string
>>> s = string("Hello, World")
>>> s
'Hello, World'
>>> s.len()
12
>>> s.length
12
>>> s.size
12
>>> s + ", What?"
Traceback (most recent call last):
  File "strings.py", line 27, in <module>
    x = s.add(", world")
  File "strings.py", line 20, in add
    return self + string(value)
  File "strings.py", line 23, in __add__
    raise NotImplementedError("Use add instead")
NotImplementedError: Use add instead
>>> s.add(", What?")
'Hello, World, What?'

Background

Inspired by my StringTheory April Fool's Day joke, recently I wondered how hard would it be to implement strings the way I want them to be in Python.

About

Python strings for humans

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages