The od package adds a shorthand syntax to create instances of OrderedDict
>>> import od
>>>
>>> od["cat": "fish", "mouse": "cheese"]
OrderedDict([('cat', 'fish'), ('mouse', 'cheese')])
>>> od["mouse": "cheese", "cat": "fish"]
OrderedDict([('mouse', 'cheese'), ('cat', 'fish')])
You can also use it like the regular constructor for OrderedDict:
>>> od()
OrderedDict()
>>> an_iterable = [("cat", "fish"), ("mouse", "cheese")]
>>> od(an_iterable)
OrderedDict([('cat', 'fish'), ('mouse', 'cheese')])
Install this package using pip:
$ pip install --user od
Metadata
Release files for od 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| od-1.0.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| od-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.9 kB
Release files / od-1.0.tar.gz
| Download URL | od-1.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1c94cd3af5fdb13ca27c4d3e1601c77028f36bbba9e78c324daf0c1ac06e3ab
|
|
BLAKE2b-256 checksum How to use checksums |
5fd0c91a75e71e2e780fc1d478420497ebfb0d3f450370ff6254f0f369db5e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / od-1.0-py3-none-any.whl
| Download URL | od-1.0-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52d4c8dafbb274abc41e8ca4507f6fd3718d6a26dc449cb9bfb700adc43e1154
|
|
BLAKE2b-256 checksum How to use checksums |
925b73044c22c5f83caebf36eb4c28dfdc6399218e8d99d89bb2057d05c68260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |