Clear List

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

Clear List

Boiteux, Benoit

Hello,

 

I’m using an Enum that depends on a List to fill a combo box in Traits.

To create the list, I do:

Mylist.append(“myvalue”)

 

How do we clean the list please ? (I tried .clear(), .clean, .removeall()…but that doesn’t exist)

 

Thanks

Benoit

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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

Re: Clear List

Craig McDonnell

If it’s like standard Python

 

del list[0]

 

discards the first item

 

del list[:]

 

discards all items

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Boiteux, Benoit
Sent: 28 May 2010 11:39
To: [hidden email]
Subject: [Enthought-Dev] Clear List

 

Hello,

 

I’m using an Enum that depends on a List to fill a combo box in Traits.

To create the list, I do:

Mylist.append(“myvalue”)

 

How do we clean the list please ? (I tried .clear(), .clean, .removeall()…but that doesn’t exist)

 

Thanks

Benoit

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
 
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
This e-mail and any attachment may contain confidential and/or privileged information. If you have received this e-mail and/or attachment in error, please notify the sender immediately and delete the e-mail and any attachment from your system. If you are not the intended recipient you must not copy, distribute, disclose or use the contents of the e-mail or any attachment. 
All e-mail sent to or from this address may be accessed by someone other than the recipient for system management and security reasons or for other lawful purposes. 

Xype Limited is registered in England and Wales under company number 04516192. The company's registered office is Unit 1 Brabazon Office Park, Golf Course Lane, Filton, Bristol, BS34 7PZ

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