Movatterモバイル変換
[0]ホーム
[Python-ideas] Fwd: Define a method or function attribute outside of a class with the dot operator
Ethan Furmanethan at stoneleaf.us
Fri Feb 10 14:02:29 EST 2017
On 02/10/2017 10:48 AM, Nick Timkovich wrote:> If everything was contained right in the same file, this is sanctioning> another way to do it (when there should only be one obvious way).No worries, this way is not obvious.> If you have multiple modules/packages, horrors can evolve where a class> method could be patched in an unknown location by any loaded module (or> you could even introduce order-of-import sensitivities).Folks can still do that nightmare right now.I'm -0.5 on it -- I don't think the payoff is worth the pain.But I'm +1 on writing a PEP -- collect all these pros and cons in one place to save on future discussion. (And (good) PEP writing is a way to earn valuable Python Points!)--~Ethan~
More information about the Python-ideasmailing list
[8]ページ先頭