开发者

I've never seen 'class __proxy__' before, what does this mean(I only have seen that like def __str__)

this code is in the django.开发者_如何学Cutils.functional.py

class __proxy__(Promise):

thanks


"Magic names", ones that start and end with double underscores, are reserved for the language in Python (but the compiler does not enforce that rule at present); Django is violating that rule, or setting itself up as "being the language" -- not a terrible sin, but an unpleasant practice.


It's just a name. And because it starts with _ it's meant to be private to that module.

Why they chose that name? You'll have to ask the developers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜