number and units
Project description
包 digital_unit 1.6b1
(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.6b1版本新增
修改了导入方式。
1.6b1版本修正
无
package digital_unit 1.6b1
(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.6b1
Modified the import method.
Corrected in version 1.6b1
None
Project details
Release history Release notifications | RSS feed
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.6b1.tar.gz
(3.9 kB
view hashes)