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-python-code example:

i = MyClass()

xxx(i, 1, 2);

...
def xxx(self, MyClass myclass, number, foobar):
   myclass.classsmethod() #myclass - is an instance of known class
-- 
http://mail.python.org/mailman/listinfo/python-list


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 that clashes with the built-in function. 
> Example uses of 'type': 
> 
> 
> 
> type(ENTER)
> 
> 
> 
> type("Hello World!")
> 
> 
> 
> type(CTRL + 'a')
> 
> 
> 
> What, in your view, would be the most intuitive alternative name?
> 
> 
> 
> Here are my thoughts so far: I could call it 'press' but then our GUI 
> automation tool also allows you to click things and then "press" might be 
> mistaken for "pressing a button". A less ambiguous alternative is "type_keys" 
> but that is rather long and doesn't read as well, for instance in 
> type_keys(ENTER).
> 
> 
> 
> Thank you very much!

-- 
http://mail.python.org/mailman/listinfo/python-list