list(), tuple() should not place at "Built-in functions" in documentation

bruno.desthuilliers at gmail.com bruno.desthuilliers at gmail.com
Fri Jul 15 09:27:22 CEST 2011


On Jul 15, 4:58 am, Inside <fancheyuj... at gmail.com> wrote:
> Hey guy,thx for you feedback first.
>
> But I can't follow your opinion.Why?because of the list & tuple are placed at built-in function,so before I type 'list' unintentionally on the pyshell and it show me "<type 'list'>", I never know that the name 'list' is a type,I used to consider it's a function to produce 'list' type.
>
> so,after I figure out this matter,I have to change all my code "assert isinstance(someobj, (type([]), type((0, ))))" to "assert isinstance(someobj, (list, tuple))",that's not a funny job.

Are you sure you need such assertions in your code ?



More information about the Python-list mailing list