Lukasz Szybalski ha scritto:
> Hello,
> Is there a reason widgets return 'null' instead of None, aka string vs
> NoneType?
>
> {"tg_flash": null, "kwargs": {"LastName": "CLARK", "XXXNo": null,
> "searchtype": "Exact"}}
>
> Is this a bug? I think the None should be returned instead of null,
> then one could test:
> if kwargs['LastName']:
> #do stuff
>
> vs now I have to check for null or ' ' or ...etc?
>
> ???
> Lucas
>
>
>
Try to check the empty_value function of your validator.
you can pass this value to validator:
empty_value = lambda x: None #example
Glauco
--
+------------------------------------------------------------+
Glauco Uri
glauco(at)sferacarta.com
Sfera Carta Software® info(at)sferacarta.com
Via Bazzanese,69 Casalecchio di Reno(BO) - Tel. 051591054
+------------------------------------------------------------+
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---