https://github.com/navdeep-G/eng_join
An english joiner for Python.
https://github.com/navdeep-G/eng_join
Last synced: about 2 months ago
JSON representation
An english joiner for Python.
- Host: GitHub
- URL: https://github.com/navdeep-G/eng_join
- Owner: navdeep-G
- Created: 2017-01-23T23:09:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-23T23:17:16.000Z (over 8 years ago)
- Last Synced: 2024-05-19T07:28:38.022Z (12 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 14
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
eng_join: a simple english joiner
=================================This module is pretty self-explanatory.
::
>>> from eng_join import join
>>> join(['blue', 'red', 'yellow'], conj='or', im_a_moron=True)
'blue, red or yellow'
>>> join(['blue', 'red', 'yellow'], conj='or')
'blue, red, or yellow'
>>> join(['blue', 'red'], conj='or')
'blue or red'
>>> join(['blue', 'red'], conj='and')
'blue and red'
>>> join(['blue'], conj='and')
'blue'
>>> join(['blue', 'red', 'yellow', 'green', 'yellow'], conj='and')
'blue, red, yellow, green, and yellow'
`im_a_moron` removes support for the Oxford comma. I have opinions.Installation
------------::
$ pip install eng_join
✨🍰✨