[Python-de] auf Liste testen

Andreas Jung lists at andreas-jung.com
Don Dez 15 15:03:12 CET 2005



--On 15. Dezember 2005 14:57:31 +0100 Benjamin Kaminski <BeKaminski at web.de> 
wrote:

> Ach ja für strings
>
>
> if type(l) == str
>
>
> oder
>
>
> from types import StringType
> if type(l) == StringType
>> http://python.net/mailman/listinfo/python-de

type() verwendet man schon seit Ewigkeiten nicht mehr.
isinstance() ist heute übliche Methode.

-aj

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : nicht verfügbar
Dateityp    : application/pgp-signature
Dateigröße  : 186 bytes
Beschreibung: nicht verfügbar
URL         : http://starship.python.net/pipermail/python-de/attachments/20051215/76155359/attachment.pgp