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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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