开发者

does Python support constants that are enforced by the interpreter? [duplicate]

开发者 https://www.devze.com 2023-02-02 00:15 出处:网络
This question already has answers here: Closed 12 years ago. Possible Dupli开发者_C百科cate: Creating constant in Python
This question already has answers here: Closed 12 years ago.

Possible Dupli开发者_C百科cate:

Creating constant in Python

Does Python support constants that are enforced by the interpreter? For example: integer constants. How about a programmer defined enumerated type?


No. If you want something to be constant then just refrain from modifying it.

0

精彩评论

暂无评论...
验证码 换一张
取 消