X-1.0rc3: Sikuli's "type" command collides with Jython's type command --- workarounds
Bug #906343 reported by
David Michael Pennington
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
In Progress
|
Low
|
RaiMan |
Bug Description
*** workarounds see comment #1
-------
The issue is simple, long-time Jython users have no intuitive way to use Jython's traditional 'type()' command to introspect data types [Ref 1].
This is a serious problem for anyone who is used to Jython. When we get any kind of data, it is normal to look at it to ensure that you got what you expected (particularly since Jython uses duck typing) [Ref 2].
References:
[1]: http://
[2]: http://
summary: |
- Sikuli's "type" command collides with Jython's type command --- - workarounds + X-1.0rc3: Sikuli's "type" command collides with Jython's type command + --- workarounds |
Changed in sikuli: | |
status: | New → Confirmed |
Changed in sikuli: | |
status: | Confirmed → Fix Committed |
assignee: | nobody → RaiMan (raimund-hocke) |
milestone: | none → x1.0 |
tags: | removed: type |
Changed in sikuli: | |
status: | Fix Committed → In Progress |
Changed in sikuli: | |
milestone: | x1.0 → none |
importance: | Undecided → Low |
To post a comment you must log in.
This is a long known problem and might be solved in a future version by an alternative command for Sikuli's type().
Meanwhile (especially for people used to Python/Jython ;-) there are some workarounds
# --1 _.type( "")
import __builtin__
s = "x"
print __builtin__.type(s) == __builtin_
or even
import __builtin__ as __b
s = "x"
print __b.type(s) == __b.type("")
#--2
print isinstance(s, str)
#--3 _.__name_ _
print s.__class_