开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜