Skip to main content

类型辅助模块

Project description

xy_type

说明

类型工具.

源码仓库

安装

pip install xy_type

开始

from xy_type.utils import count_of_function_arguments, validate_callable_func, validate_callable_init_func, has_func, empty_value

class xyObject:

    def __init__(self, arg_0=0, arg_1=1):
        pass

    def xyFunc(self, arg_0=0, arg_1=1):
        pass

    @classmethod
    def xyClsFunc(cls, arg_0=0, arg_1=1)
        pass

count_of_function_arguments(xyObject.xyClsFunc)
# 2

validate_callable_func(xyObject.xyClsFunc)
# True

validate_callable_init_func(xyObject, 1)
# True

obj = xyObject()
has_func(obj, "xyFunc", 2)
# True
has_func(obj, "xyFunc1", 2)
# False
has_func(obj, "xyFunc", 20)
# False

empty_value(obj, xyObject, None)
# obj

empty_value(obj, str, None)
# None

许可证

xy_type 根据 <木兰宽松许可证, 第2版> 获得许可。有关详细信息,请参阅 LICENSE 文件。

捐赠

如果小伙伴们觉得这些工具还不错的话,能否请咱喝一杯咖啡呢?

Pay-Total

联系方式

微信: yuyangiit
邮箱: yuyangit.0515@qq.com

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

xy_type-1.0.8.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

xy_type-1.0.8-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file xy_type-1.0.8.tar.gz.

File metadata

  • Download URL: xy_type-1.0.8.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for xy_type-1.0.8.tar.gz
Algorithm Hash digest
SHA256 8906e630c44fd949690d2195ffb83814b150f268a22ea2fc9f8c5f9b0a6064d6
MD5 7476822a1f8a5b43c6a6359e2285f2aa
BLAKE2b-256 7a467f07f36678c023cae6eee757d2340e6a0ac0632eaa77cd997f24f0d9f8ab

See more details on using hashes here.

File details

Details for the file xy_type-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: xy_type-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for xy_type-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 08c31443527c1faf4b118d7cb128feb3355a99cf2b32d183a058ec915c659740
MD5 35ac56e5d8b05838e835f85458e4770f
BLAKE2b-256 2c2f651e031225ee2373a69d59eeef06ae28c00083e158bf508c1f8cbf33529a

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