Skip to main content

number and units

Project description

包 digital_unit 1.6

(language:Chinese)

这是一个有关数据的单位的包,如长度、面积、体积等,可以用它来表示一个数量的单位 使用示例

from digital_unit import CentiMeter,MilliMeter, Number


if __name__ == '__main__':
    _1cm = Number(1.0, CentiMeter()) # Create the data. Don't forget the parentheses!
    print(_1cm)
    _1cm.change_unit(MilliMeter()) # Changes to the unit. Don't forget the parentheses!
    print(_1cm)

使用Number(NUMBER, UNIT())来创建实例,使用XXX.change_unit(NEWUNIT())来修改单位。

1.6版本新增

Temperature(温度系列)

1.6版本修正

package digital_unit 1.6

(language: English)

This is a unit of data related to packages, such as length, area, volume, etc., it can be used to represent a number of units Use the sample

from digital_unit import CentiMeter, MilliMeter, Number

if __name__ == "__main__" :
_1cm = Number(1.0,CentiMeter()) # Create the data. Don 't forget the parentheses.
print(_1cm)
_1cm.Change_unit(MilliMeter()) #Changes to the unit. Don 't forget the parentheses.
print(_1cm)

Using Number(NUBER, UNIT()) to create an instance, use XXX.Change_unit(NEWUNIT ()) to modify the UNIT

Added in version 1.6

Temperature (Temperature series)

Corrected in version 1.6

None

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

digital_unit-1.6.0.tar.gz (3.2 kB view hashes)

Uploaded Source

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