← Back to team overview

sikuli-driver team mailing list archive

[Bug 906343] Re: Sikuli's "type" command collides with Jython's type command

 

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
import __builtin__
s = "x"
print __builtin__.type(s) == __builtin__.type("")

or even
import __builtin__ as __b
s = "x"
print __b.type(s) == __b.type("")

#--2
print isinstance(s, str)

#--3
print s.__class__.__name__


** Summary changed:

- Sikuli's "type" command collides with Jython's type command
+ Sikuli's "type" command collides with Jython's type command --- workarounds

** Description changed:

+ *** 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://www.jython.org/jythonbook/en/1.0/DataTypes.html
  [2]: http://www.jython.org/jythonbook/en/1.0/ObjectOrientedJython.html

** Summary changed:

- 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

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/906343

Title:
  X-1.0rc3: Sikuli's "type" command collides with Jython's type command
  --- workarounds

Status in Sikuli:
  Confirmed

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://www.jython.org/jythonbook/en/1.0/DataTypes.html
  [2]: http://www.jython.org/jythonbook/en/1.0/ObjectOrientedJython.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/906343/+subscriptions


References