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

2011-07-14 Thread Inside
As telling in the subject,because "list" and "tuple" aren't functions,they are types.Is that right? -- http://mail.python.org/mailman/listinfo/python-list

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

2011-07-14 Thread Inside
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 "", I never know that the name 'list' is a type,I used to consider it's a function to produce

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

2011-07-15 Thread Inside
Why I use assertion,please check this code: """ class User(object):pass class Student(User):pass class Professional(User):pass def add(user): assert(user, User) def add(users): assert(users, (tuple, list)) #If necessary I'll also check every obj in the sequence to see whether it's

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

2011-07-15 Thread Inside
> Perhaps you meant this? > > assert isinstance(user, User) Yes I meant this,sorry,my mistake. Thx for your and Ben's feedbacks first,it's appreciated. your points is taken by me,but I want to make my opinion more clearly. The assertion is JUST show to my function call

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

2011-07-15 Thread Inside
Supplement: The assertion will not be handled anyway. I want AssertionError raise as early as possible.(mentinoed before) -- http://mail.python.org/mailman/listinfo/python-list

How to pass class instance to a method?

2012-11-25 Thread ALeX inSide
How to "statically type" an instance of class that I pass to a method of other instance? I suppose there shall be some kind of method decorator to treat an argument as an instance of class? Generally it is needed so IDE (PyCharm) can auto-complete instance's methods and properties. Pseudo-pyt

Re: 10 sec poll - please reply!

2012-11-25 Thread ALeX inSide
press_keys() On Tuesday, November 20, 2012 2:18:38 PM UTC+2, Michael Herrmann wrote: > Hi, > > > > I'm developing a GUI Automation library (http://www.getautoma.com) and am > having difficulty picking a name for the function that simulates key strokes. > I currently have it as 'type' but tha