Extract python datatypes from Str,Int,Float?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Extract python datatypes from Str,Int,Float?

BERTOLINI Lorenzo
Extract python datatypes from Str,Int,Float?

Hello List,
I am new to the Traits package. I like it very much and consider using it a lot
in the next months...
I wonder how I can extract a str from Str, or an int from Int etc...
Thanks a lot,
Lorenzo

*******************************************************************************
This message, including attachments, is intended for the above-mentioned 
addressees only. It may contain confidential information the review, 
dissemination or disclosure of which is strictly prohibited. Should you 
receive this message in error, please delete it and notify the sender to the 
e-mail address indicated above.

Ce message, ainsi que les pieces jointes, sont exclusivement destines aux 
personnes dont le nom figure ci-dessus. Ils peuvent contenir des informations 
confidentielles dont la divulgation est a ce titre rigoureusement interdite. 
Dans l'hypothese ou vous auriez recu ce message par erreur, merci de le 
supprimer et d'en avertir l'expediteur a l'adresse e-mail ci-dessus.

Diese E-Mail, einschliesslich angehangter Dateien, kann vertrauliche und/oder 
rechtlich geschutzte Informationen enthalten. Wenn Sie nicht der beabsichtigte 
Empfanger sind oder diese E-Mail irrtumlich erhalten haben, informieren Sie
bitte sofort den Absender per E-Mail und loschen Sie diese E-Mail aus Ihrem
System. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail 
ist nicht gestattet.
*******************************************************************************

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Extract python datatypes from Str,Int,Float?

Peter Wang
Hi Lorenzo,

What do you mean "extract"?  You reference Trait attributes just like
normal Python attributes.  The validation happens behind the scenes
for you.  Have you taking a look at the Traits Tutorial?

http://code.enthought.com/projects/traits/docs/html/traits_user_manual/intro.html
http://drliddle.com/index.php?option=com_content&view=article&id=14:quicktuttraits&catid=3:tutorials&Itemid=6


-Peter
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Extract python datatypes from Str,Int,Float?

Jonathan March
Hi Lorenzo,
A Str attribute *is* a str, and an Int attribute *is* an int -- check their types if you doubt it -- It's just that they have extra initialization, validation, and notification capabilities. So there's no extraction needed.
Jonathan

On Wed, Jan 12, 2011 at 10:32 AM, Peter Wang <[hidden email]> wrote:
Hi Lorenzo,

What do you mean "extract"?  You reference Trait attributes just like
normal Python attributes.  The validation happens behind the scenes
for you.  Have you taking a look at the Traits Tutorial?

http://code.enthought.com/projects/traits/docs/html/traits_user_manual/intro.html
http://drliddle.com/index.php?option=com_content&view=article&id=14:quicktuttraits&catid=3:tutorials&Itemid=6


-Peter
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev