On 2011.07.07 08:39 AM, Phlip wrote:
> On Jul 7, 6:24 am, Andrew Berg <bahamutzero8...@gmail.com> wrote:
> > On 2011.07.07 08:11 AM, Phlip wrote:> No, I was pointing out that passing a 
> > type is more ... typesafe.
> >
> > None is a type.
>
> I never said it wasn't.
You are talking about this code, right?

def file_to_hash(path, m=None):
    if m is None:
        m = hashlib.md5()

What's not a type? The is operator compares types (m's value isn't the
only thing compared here; even an separate instance of the exact same
type would make it return False), and m can't be undefined.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to