从英文文本生成Python标识符
项目描述
从英文文本生成Python标识符。适用于代码生成。
类名
>>> pydentifier.upper_camel("I'm a class", prefix='')
'IAmAClass'
函数名
>>> pydentifier.lower_underscore('This is a function', prefix='')
'this_is_a_function'
保留关键字
>>> pydentifier.lower_underscore('class', prefix='')
'class_'
内部方法
>>> pydentifier.lower_underscore("Shouldn't touch this", prefix='_')
'_should_not_touch_this'
私有方法
>>> pydentifier.lower_underscore("Can't touch this", prefix='__')
'__cannot_touch_this'
项目详情
关闭
pydentifier-0.1.3.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 981f9705f71e0307a22030d3908369847b99a40caa5dba99aea9989400eb56a6 |
|
MD5 | 31f1d22b24301ed4decf341d9bc47813 |
|
BLAKE2b-256 | d3390802db69dd9236b6f1d1c8ee5044642585b8e73c22081fe256abfafd5191 |