Re: [sage-devel] Sanity check on objects, parents and elements

2010-03-06 Thread Nicolas M. Thiery
On Fri, Feb 26, 2010 at 10:46:15PM +0100, Florent hivert wrote: > > Quick question: many types have methods one_element() and > > zero_element() which are used a lot. For example, ZZ.one() and > > ZZ.zero() are aliases for ZZ.one_element() and ZZ.zero_element(). Is > > your intention to depreca

Re: [sage-devel] Sanity check on objects, parents and elements

2010-03-01 Thread Florent Hivert
Hi Robert, >> One of the main problem here is that PEP 335 "Overloadable Boolean >> Operators" >> is not yet accepted. So right now there is no way to implement a three >> state >> logic, is there one ? If not, Is there a way we can push on python dev to >> have >> this PEP accepted ? >

Re: [sage-devel] Sanity check on objects, parents and elements

2010-03-01 Thread Robert Bradshaw
On Mar 1, 2010, at 1:22 PM, Florent Hivert wrote: Not my idea. This was the way it worked in MuPAD. There was a three state boolean value, which was quite useful. Looking into python docs to see if we can have "and" and "or" work with a 3-state booleans, I found: " A rich comparison method

Re: [sage-devel] Sanity check on objects, parents and elements

2010-03-01 Thread Florent Hivert
>> Not my idea. This was the way it worked in MuPAD. There was a three state >> boolean value, which was quite useful. Looking into python docs to see if >> we >> can have "and" and "or" work with a 3-state booleans, I found: >> >> " A rich comparison method may return the singleton NotImplemented

Re: [sage-devel] Sanity check on objects, parents and elements

2010-03-01 Thread Robert Bradshaw
On Feb 27, 2010, at 2:22 PM, Florent Hivert wrote: Hi Robert, You get the point. As far as I understand a RIF only return True if the interval are reduced to a single point. Is it right ? It would be better to return a special value like Unknown than False. But that's another question

Re: [sage-devel] Sanity check on objects, parents and elements

2010-03-01 Thread Florent Hivert
Hi Robert, >> You get the point. As far as I understand a RIF only return True if the >> interval are reduced to a single point. Is it right ? It would be better >> to >> return a special value like Unknown than False. But that's another >> question... >> >> [...] > > I certainly agree tha

Re: [sage-devel] Sanity check on objects, parents and elements

2010-03-01 Thread Florent Hivert
> I certainly agree that 1-2 should be the general rule, I was just pointing > out an exception. I like the idea of returning an Unknown object on RIF > comparisons as well. This is now #8402 (work in progress). Florent -- To post to this group, send an email to sage-devel@googlegroups.com To

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-27 Thread Robert Bradshaw
On Feb 27, 2010, at 3:14 AM, Florent Hivert wrote: Hi Robert, In order to sanitize the behavior of objects, parents and elements in sage, I'm about to add some tests to the framework. I think they are all reasonable but I may be asking to much. Please comment about the following: 1 - A

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-27 Thread David Roe
I agree, subject to changing "SageObject" in 1 to "Element and CategoryObject". David On Sat, Feb 27, 2010 at 6:14 AM, Florent Hivert < florent.hiv...@univ-rouen.fr> wrote: > Hi Robert, > > >> In order to sanitize the behavior of objects, parents and elements in > >> sage, > >> I'm about to

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-27 Thread Florent Hivert
Hi Robert, >> In order to sanitize the behavior of objects, parents and elements in >> sage, >> I'm about to add some tests to the framework. I think they are all >> reasonable >> but I may be asking to much. Please comment about the following: >> >> 1 - Any SageObject must have an equalit

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread Robert Bradshaw
On Feb 26, 2010, at 12:59 PM, Florent Hivert wrote: Hi there, In order to sanitize the behavior of objects, parents and elements in sage, I'm about to add some tests to the framework. I think they are all reasonable but I may be asking to much. Please comment about the following: 1

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread Florent Hivert
> Quick question: many types have methods one_element() and > zero_element() which are used a lot. For example, ZZ.one() and > ZZ.zero() are aliases for ZZ.one_element() and ZZ.zero_element(). Is > your intention to deprecate these longer names? I had the impression that this has been already

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread Florent Hivert
Hi David, > > In order to sanitize the behavior of objects, parents and elements in sage, > > I'm about to add some tests to the framework. I think they are all > > reasonable > > but I may be asking to much. Please comment about the following: > > > > 1 - Any SageObject must have an equali

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread Nick Alexander
On 26-Feb-10, at 12:59 PM, Florent Hivert wrote: Hi there, In order to sanitize the behavior of objects, parents and elements in sage, I'm about to add some tests to the framework. I think they are all reasonable but I may be asking to much. I think your suggestions are reasonable

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread John Cremona
Quick question: many types have methods one_element() and zero_element() which are used a lot. For example, ZZ.one() and ZZ.zero() are aliases for ZZ.one_element() and ZZ.zero_element(). Is your intention to deprecate these longer names? John On 26 February 2010 21:16, David Roe wrote: > > >

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread David Roe
On Fri, Feb 26, 2010 at 3:59 PM, Florent Hivert < florent.hiv...@univ-rouen.fr> wrote: > Hi there, > > In order to sanitize the behavior of objects, parents and elements in sage, > I'm about to add some tests to the framework. I think they are all > reasonable > but I may be asking to much.

Re: [sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread Florent Hivert
Hi Sorry for replying to myself. > In order to sanitize the behavior of objects, parents and elements in sage, > I'm about to add some tests to the framework. I think they are all reasonable > but I may be asking to much. Please comment about the following: > > 1 - Any SageObject must hav

[sage-devel] Sanity check on objects, parents and elements

2010-02-26 Thread Florent Hivert
Hi there, In order to sanitize the behavior of objects, parents and elements in sage, I'm about to add some tests to the framework. I think they are all reasonable but I may be asking to much. Please comment about the following: 1 - Any SageObject must have an equality methods such that