Re: API thoughts

Barry Warsaw <[email protected]> Thu, 3 Mar 2011 21:55:59 -0500
Newsgroups gmane.comp.python.mime.devel
Organization Damn Crazy Followers of the Horn
Message-ID <[email protected]>
On Mar 02, 2011, at 08:23 PM, R. David Murray wrote:

>Pretty much.  I think they will also contain some callable methods,
>to provide hooks where a policy subclass can implement a custom policy.
>My current implementation has such a hook for registering defects, which
>would allow a custom policy to, for example, log the defects in addition
>to or instead of putting them into the defects list.

Makes sense.

>I'm not sure what we you mean by multiple registrations.  Can you give
>an example?

I really meant multiple registries, mostly thinking about how to avoid some
global state.  But Python already has some global registries, so maybe that's
not too bad in this case.

-Barry
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJNcFS/AAoJEBJutWOnSwa/lrAP/jQY0GBbKW3dpQ89AZCdLhNT
MOGGYkVybvVm4GP0YIGM9UOOftief2tJb+lkyEGqaqoFYGkiWlu9P3Am0C7K9WnX
fnRrzWVqIFOiFT9r5amX3bVbm+iPe9aMhLEW3KVtrWfBQsVH9rTVU1tbt37E1I9q
2MKhUpGpj+uZ34b0oLW57M5KU28fNbB6Hc/luOkaXboPL1YGNY3JNW9t+spDlPYZ
F9vUaVcr9QVCSeWzpkjmkCLWwOopGfxUM6sXAzW9jHvPaCc1C+V1M/jnKhD4SgXG
o3krdbjSt4ffAY6mXemygnuYamfSl7x9/WU8HxYNpo14+7+6HHgP8ugyrRttS0F5
34rnJ5RwMyjWmL6dxtBXrx2wHFw/pC3rBKjcC2U4skIH8ulfa2R2TMDYh4jSRCb4
/F/InHl52hpcV/aLHNq8jwvYtNAWIuSJ2bIrTvzmp3xRKFvjZMXN5tqgSRBG3MOB
NrrPG3ksfCGPzub/4yNwUp/sjS5xxeiZnxtn9R05Ewf9NVpDwEPux6tWnhnO/uFb
nJlpqs74vpaQOclbFtNLb8khhQIEg2nYxMfzyoULkHWX/OMEohef+6Dw2CY/pKrI
G432FxPOkpEV2AUDQ/faiRatIfAO+UhRTUESAY9Vh5SvCIVJHcMjmokS56NoVbDo
Og7xGPvufqX0OZrAnkEP
=S8GE
-----END PGP SIGNATURE-----