Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: does lack of type declarations make Python unsafe? (http://www.velocityreviews.com/forums/t318998-re-does-lack-of-type-declarations-make-python-unsafe.html)

David Abrahams 06-29-2003 11:13 PM

Re: does lack of type declarations make Python unsafe?
 
david.abrahams@rcn.com (David Abrahams) wrote in message news:<ea97dfd9.0306290730.137c6837@posting.google. com>...

> Alex Martelli <aleax@aleax.it> writes:
>
> > In Python one generally identifies (just as informally) a container as
> > "an object which has a length" (using "length", perhaps a suboptimal
> > choice of wording, to mean "number of items currently contained") and
> > simultaneously express both 'c is a container' and
> > 'that container is not empty' by

^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sorry, I missed that.

> >
> > assert len(c)

>
> That understanding of "containerness" is, AFAICT, not universally held
> among Pythonistas by any means.


I still stand by the above.

> Good thing too, probably: it looks
> like there is no such thing as an empty container:
>
> >>> assert len([])

> Traceback ...


But that example was obviously just wrong.

-Ddave


All times are GMT. The time now is 12:02 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57