Skip to main content

A simple recursive function that allows to give more information about an object than 'type' binded function

Project description

Overview

Supertype-python is a package containing a single function, supertype(). This one works like type but gives more information, which could be useful in a development phase.

Installation

pip install supertype-python

Usage

Without this package, it would take some precious time and precious attention to know the content of an object like this :

a = [0,1,2]
b = 'bbb'
c = 5
d = {"x": "X", "y": "Y", "z": "Z"}
e = [a,b]
f = (e,c,d)

Now, you can import supertype() and just ask the supertype of the object f :

from supertype import supertype

supertype(f)

This returns :

tuple of 3 elements containing :
    -list of 2 elements containing :
        -list of 3 elements containing {'int'}
        -str of 3 elements
    -int
    -dict of 3 elements

This also works with objects from other librairies and even with you homemade objects !

What should be added soon

-correction of language approximations
-specific treatment for some types (not very useful to know the size of a string for example)
-better comments
-check compatibility with all python 3, see if it can go to python 2
-...

If you have any idea or suggestion feel free to contact me on my email.

Contributors

Martin Letzgus Antoine Thiol Quentin Petit

License

MIT

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

supertype-python-1.0.6.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

supertype_python-1.0.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file supertype-python-1.0.6.tar.gz.

File metadata

  • Download URL: supertype-python-1.0.6.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for supertype-python-1.0.6.tar.gz
Algorithm Hash digest
SHA256 c7d20eac8a51eef7b522092ccbfd71d9ce9bee7e3d4a6d68ec06aaaba15253a1
MD5 523241e86275eac74b9c86f0db91c334
BLAKE2b-256 276b2370d786fce1ac6160c9752e05ab1be7e50adc7780aa1fcbccb1cba300d8

See more details on using hashes here.

File details

Details for the file supertype_python-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: supertype_python-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for supertype_python-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4194874e1c0d8fc6f3ac689c6981ed0592a0e25f710d0fc58670582fc23eeecf
MD5 d25c2cdfed45f07fab2f5e963611fc4f
BLAKE2b-256 f2063fccd5cf1130b8864ff4edefb7e82c9ce6dbbac5fae6fa8a1f6830b0b2a9

See more details on using hashes here.

Supported by

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