Skip to main content

function print work or not work

Project description

模块介绍

这个模块封装了一个类,类中有一个__init__方法和一个print方法,

当初始化传入的时True时,print方法等同于内置函数print,

当传入False时,print方法不会打印任何东西。

代码示例

from donotprint.donotprint import Print

my_str = 'string'

a = Print(True)
a.print(my_str)  # 此时会输出值

b = Print(False)
b.print(my_str)  # 此时不会输出值

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

donotprint-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

donotprint-1.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file donotprint-1.0.0.tar.gz.

File metadata

  • Download URL: donotprint-1.0.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for donotprint-1.0.0.tar.gz
Algorithm Hash digest
SHA256 09fe6b8a58277e85d7f8d5abdd91dbb1fdca0de1b107191c009298381dc08942
MD5 2c5e9f2c1aed33ea842ffd5d12724550
BLAKE2b-256 8d18107631a2c641d3b52c61b1c5a2731296e1d88389ad804a6b806e6e3877e5

See more details on using hashes here.

File details

Details for the file donotprint-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: donotprint-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for donotprint-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d279697faacadc8b8a19936aa479512953ce9599bc8d1493ed0383c755582124
MD5 d50f5cdf916a81f62b40f234a4d5ec6e
BLAKE2b-256 1f2a6e1d8b8260a7c2e44b2d66ecd1c77168989dc6193b7a5dc425f318f74197

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