Skip to main content

aaaaaaaaaa

Project description

han

PyPI

han = 汉
han = 汉(字)

一个python常用函数库,里面的函数都是中文汉字

该项目翻译了部分函数,但没有对原函数做任何修改,不会影响你以前的代码
该项目并非生硬的翻译python标准库,而是在某些地方做了修改,减少歧义,
round() 是python里做四舍五入运算的,
round(1.675, 2) # 返回值 1.68,小数部分是68
round(2.675, 2) # 返回值 2.67,小数部分是67
返回值里的最后一位小数点则充满了歧义,一个是8,一个是7,违反了人类直觉

而本项目的函数 四舍五入() 则没有这种违反直觉的歧义,

你可以根据自己的需要使用本项目的 四舍五入() 或者用python自带的 round()

注:经过简单测试,在以下语言中,round函数的返回值是符合直觉的,这让我们有底气重写 四舍五入() :
php(round)、c++(round)、c#(Math.Round)、office Excel(round)
其他语言,软件 没有测试,不太懂

使用前提:

  • python > 3.8+ (3.8以上的版本)

安装

pip install han

用法

from han.数学 import *

求绝对值(-123)
 

文档

gitee(速度快) https://xxxxx.com
github(速度慢) https://xxxxx.com

测试

1、下载代码到本地,进入代码根目录
2、执行 pip install poetry
3、执行 poetry install
4、执行 pytest

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

han-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

han-0.1.2-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file han-0.1.2.tar.gz.

File metadata

  • Download URL: han-0.1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Darwin/20.5.0

File hashes

Hashes for han-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b57f64b8a5ea607ab8272ed958b9197f066d820dd7b497c4906c928abb8ca70e
MD5 bca28656e6ecd30bc8293f31d1f679d4
BLAKE2b-256 da75462cbf1fb29a66421ed51adcef8f06ee5e813649ede9489b0db37ce3619f

See more details on using hashes here.

File details

Details for the file han-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: han-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Darwin/20.5.0

File hashes

Hashes for han-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6e37380566674acf916c45a9ca1df551d09a131e29b286f7f08c845807f9da
MD5 7d3cbd2fd5c4be3c6a819a9b5c1f94a6
BLAKE2b-256 7bcb57a4303b5dee1173ef4df324819ed75db7e875ed7fbc233f3587f2584052

See more details on using hashes here.

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