On 11/22/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote:

> While this is more verbose than sticking an 'if' into the original
> sendmail(), note that it can also be added by a third party, via:

>      overload smtpblib.SMTP.sendmail(
>          self, from_addr, to_addrs:str, msg,
>          mail_options=[], rcpt_options=[]
>      ):
>          self.sendmail(from_addr, [to_addrs], msg, mail_options, rcpt_options)

> So, someone who didn't want to wait for the patch to add your "if" could
> just add their own fix on the fly.  :)

Hey, cool, can I also do

    overload smtplib.SMTP.sendmail(self, from_addr:str, to_addrs:str, msg, ...)
        if stalkee == from_addr:
            archive_and_randomly_rewrite_before_sending(...)

Since this is more specific on the from_addr, it should always be called.

Also, can I

    overload __builtins__.str(arg:object)

to effectively extend (or replace) the builtin type?

There is certainly value in open classes, and it can make writing code
easier.  But it can also make maintaining code much harder.  Today,
almost all classes are open, but those coded in C are typically closed
-- and Brett is relying on this for security.
How-it-happened-to-be-implemented may not be the best way to decide
open/closed, but I think there needs to be *some* way of keeping a
class closed.

-jJ
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to