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.7.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.7-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: supertype-python-1.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 50ab4a05af63f98ca59357a0069aa5f434dc232095afd65348c1f18277cdb0df
MD5 54fd0d752cf06cc042edabc2d711d104
BLAKE2b-256 1307d2effdcf53b3df5f59320fc6a113464873313dee129e0da016f1126f4c0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: supertype_python-1.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9157ed7c94ba2438f17b2b76d5fe321aaf0dacb8fa72860747b2dfa1dedbf3c2
MD5 6ca057504650f2f9f59cffeb35e04262
BLAKE2b-256 d11a49d41d44025545aa3b8893cf8591fe7110735374a3f2f66eaee863b37437

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