Skip to main content

Description

Like dict, but a little bit better

install

  pip install dictones

import

from dictones import DictOnes

Usage

1. Added constructor

  filled_dict = DictOnes('first_key, second_key', 'to first key', 'to second key')
  print(filled_dict.first_key)
  print(filled_dict.second_key)

Output

'to first key'
'to second_key'

2. Constructor without filling

  filled_dict = DictOnes('first_key, second_key')
  print(filled_dict.first_key)
  print(filled_dict.second_key)
  print(filled_dict.key)

Output

None
None
...raise KeyError(attrname)
KeyError: 'key'

3. Deleting

filled_dict = DictOnes('first_key, second_key')
print(filled_dict.first_key)
print(filled_dict.second_key)
print('second_key' in filled_dict)
del filled_dict.second_key
print('second_key' in filled_dict)

Output

None
None
True
False

Otherwise it is the same dict

Release files for dictones 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dictones 0.1.1
File Size Uploaded
dictones-0.1.1.tar.gz 24.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dictones 0.1.1
File Interpreter ABI Platform
dictones-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 60.1 kB

Release files / dictones-0.1.1.tar.gz

Download URL dictones-0.1.1.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
47aa8b718c4ddfa2bece403cafb44dd13e375c2396f1da4615fa32ec714d97ff
BLAKE2b-256 checksum
How to use checksums
a227b72bfcf00e55dde69aaf7df98ec373a0dab6b1c8bd27b5702b4f38ce5f3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.1 Windows/10

Release files / dictones-0.1.1-py3-none-any.whl

Download URL dictones-0.1.1-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c982e651629824fe7bf7a9044df569d390f441fd272872cde5a11dee19dec0f
BLAKE2b-256 checksum
How to use checksums
dbe5a9b11421081354af344728c94eb32f7c0ddd2b9f1cc04a0a40925042ecf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.1 Windows/10

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page