Movatterモバイル変換
[0]ホーム
[Python-Dev] Re: PEP 246 and Protocols (Was: Sneaky 'super' instances)
Alex Martellialeaxit@yahoo.com
Fri, 13 Jun 2003 11:11:58 +0200
On Thursday 12 June 2003 06:48 pm, Phillip J. Eby wrote: ...> effectively said is, "well, let's make it so that case "e" is irrelevant,> because there are plenty of __adapt__-capable protocols, and because you> can register the relationships between them." Thus, the solution to case> "e" is effectively:>> Don't use built-in types as protocols!Speaking as PEP 246's co-author and original champion of "case [e]", I thinkyou've hit the nail on the head. Yes, singling out protocols as the "new kidon the block" and giving each protocol the responsibility of handling theregistry of its adapters definitely strikes me as the right architecture, better than the vaguely defined one I had in mind (too vague to put in thePEP) which as you say / imply elsewhere would necessarily end up with amajor case of chronical singletonitis. I'm not sure about some other detailsof PyProtocols (guess I need to study the whole package very, verycarefully) but this general architectural idea gets a wholehearted +1 from me.Alex
[8]ページ先頭