开发者

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

开发者 https://www.devze.com 2022-12-15 00:43 出处:网络
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 Pytho

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

精彩评论

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

关注公众号