[Zope-dev] ?determine if x is a string or array in PythonScript
Martijn Pieters
mj@zope.com
Thu, 11 Jul 2002 16:36:23 -0400
On Thu, Jul 11, 2002 at 04:10:33PM -0400, Shane Hathaway wrote:
> Python scripts provide a special function, "same_type()", for this
> purpose. Example:
>
> if same_type(s, ''):
> s = [s]
Much better than my hacked-up solution. :p
--
Martijn Pieters
| Software Engineer mailto:mj@zope.com
| Zope Corporation http://www.zope.com/
| Creators of Zope http://www.zope.org/
---------------------------------------------