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

Uploaded Source

File details

Details for the file digital_unit-1.6.0.tar.gz.

File metadata

  • Download URL: digital_unit-1.6.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for digital_unit-1.6.0.tar.gz
Algorithm Hash digest
SHA256 643a0a35cc120b8f8af3c08ad06e1aa2ade6fffc2df01ca90db146072fa02d53
MD5 d96f40cb3ef91d271a354ce91bff7547
BLAKE2b-256 e009e6131177900d86128a4fdf9ed03307090601576fcb06a0c688f9d37c0d62

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