Re: [Tutor] Deleting an object

2012-01-29 Thread Alan Gauld
On 29/01/12 15:14, George Nyoro wrote: data. Thing is, I want to provide a method where one can delete the object and then if the user tries using a variable to access a certain method or attributes, he gets an error. Let me give an example; I assume you know about the built in del() function

Re: [Tutor] Deleting an object

2012-01-29 Thread Peter Otten
George Nyoro wrote: >Last time I tried to post a question regarding this, I was asked to > clarify. Okay so here it is. There is a class called Table and objects are > just tables, you know, matrices, holding different types of data. Thing > is, I want to provide a method where one can del

Re: [Tutor] Deleting an object

2012-01-29 Thread Steven D'Aprano
George Nyoro wrote: class Table: def delete_this(self): #code to delete this object or assign it null or None pass def do_something(self): pass x=Table() x.delete_this() #at this point, I want such that if I try to use x I get some sort of error e.g. x.do_something() #Error: x is definitely

Re: [Tutor] Deleting an object

2012-01-29 Thread Alexander
On Sun, Jan 29, 2012 at 10:14 AM, George Nyoro wrote: > Hi all, >    Last time I tried to post a question regarding this, I was asked to > clarify. Okay so here it is. There is a class called Table and objects are > just tables, you know, matrices, holding different types of data. Thing is, >

Re: [Tutor] Deleting an object

2012-01-29 Thread Hugo Arts
On Sun, Jan 29, 2012 at 4:14 PM, George Nyoro wrote: > Hi all, > >    Last time I tried to post a question regarding this, I was asked to > clarify. Okay so here it is. There is a class called Table and objects are > just tables, you know, matrices, holding different types of data. Thing is, >

[Tutor] Deleting an object

2012-01-29 Thread George Nyoro
Hi all, Last time I tried to post a question regarding this, I was asked to clarify. Okay so here it is. There is a class called Table and objects are just tables, you know, matrices, holding different types of data. Thing is, I want to provide a method where one can delete the object and t