Does anyone have a practical example? I have never had a particular issue
with type safety in Python, with the exception of gotchas around
floating-point division where I accidentally divided by the integer
returned by a function without casting it to float.


On Thu, Sep 5, 2013 at 5:10 PM, Javier Candeira <jav...@candeira.com> wrote:

> On Thu, Sep 5, 2013 at 5:07 PM, John La Rooy <john.lar...@gmail.com>
> wrote:
> > def (L):
> >     assert isinstance(L, list)
>
> But that way you don work well with "duck lists". Or, in my case, you
> lose polymorphism (a pythonic SortedList will work with any orderable
> type). Maybe I could "assert arerelativeorderable(newelement,
> firstelement), but that's what I do by writing "try: newelement >
> itemzero; except: BOOM"
>
> > PEP8 strongly discourages using l as a variable name
>
> It says nothing about email discussions!
>
> J
> _______________________________________________
> melbourne-pug mailing list
> melbourne-pug@python.org
> https://mail.python.org/mailman/listinfo/melbourne-pug
>



-- 
--------------------------------------------------
Tennessee Leeuwenburg
http://myownhat.blogspot.com/
"Don't believe everything you think"
_______________________________________________
melbourne-pug mailing list
melbourne-pug@python.org
https://mail.python.org/mailman/listinfo/melbourne-pug

Reply via email to