Skip to main content

Easy flattening with detailed setting

Project description

Easy flattening with detailed setting

Powered by Yamato Nagata

GitHub

>>> list(flatten(["12", (3, [4]), [5, 6, {7, "8"}]]))
['12', 3, 4, 5, 6, 7, '8']
>>> list(flatten(["12", (3, [4]), [5, 6, {7, "8"}]], ignore=(), peep=()))
['1', '2', 3, 4, 5, 6, 7, '8']
>>> list(flatten(["12", (3, [4]), [5, 6, {7, "8"}]], ignore=(), peep=(tuple,)))
['1', '2', (3, 4), 5, 6, 7, '8']
>>> list(flatten(["12", (3, [4]), [5, 6, {7, "8"}]], ignore=(), peep=(tuple,), depth=1))
['1', '2', (3, [4]), 5, 6, {7, '8'}]
>>> list(flatten(["12", (3, [4]), [5, 6, {7, "8"}]], ignore=(), peep=(tuple,), depth=0))
['12', (3, [4]), [5, 6, {7, '8'}]]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flatto-0.0.1.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file flatto-0.0.1.tar.gz.

File metadata

  • Download URL: flatto-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for flatto-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dff8acfa327d5dcff8b5235c49d9e15113d83508bc86e2d0465281eebf1073fc
MD5 5e23f658dc0b3cd140e383c1b310e9b3
BLAKE2b-256 2c643b0bc0ffa64e6f60236e158ea4ea547d9992674135e16b44e0d2a8ec744d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page