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 countaining 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

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.

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.4.tar.gz (2.1 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.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: supertype-python-1.0.4.tar.gz
  • Upload date:
  • Size: 2.1 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.4.tar.gz
Algorithm Hash digest
SHA256 601ee3ab1f42107ad93153f2670d933ca83933ee497bd54c6aa52edbe04e997c
MD5 333ec8598b2cbd341f59fac60546a870
BLAKE2b-256 53c27b6affe5943cb76382ad2de1eefee09852dca8fcf7ac948b50ec42820b9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: supertype_python-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 472dd5a24e515413525884bb289357738d22018770b2bf62f59e0382e467edbe
MD5 9d302bd9c4b7e385e3c5cd3dc2544caa
BLAKE2b-256 fc6347d2c0841bd74a913cd1d10753ee8abf26069d9182a7ce48d5945c123bf6

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