Re: Python Module Exposure

2005-07-10 Thread George Sakkis
"Jacob Page" <[EMAIL PROTECTED]> wrote: > OK, you've convinced me now to support and, or, and xor between every > combination of Intervals and IntervalSets, Intervals and IntervalSets, > and IntervalSets and Intervals. I'm sorry, this was not my intention . > However, I'm not sure I like the id

Re: Python Module Exposure

2005-07-10 Thread Jacob Page
George Sakkis wrote: > "Jacob Page" <[EMAIL PROTECTED]> wrote: > >>If the union of two integers yielded a set of integers, then >>it'd make more since for the union of two Intervals to yield an >>IntervalSet. > > AFAIK union is defined over sets, not numbers, so I'm not sure what you > mean by th

Re: Python Module Exposure

2005-07-10 Thread George Sakkis
"Jacob Page" <[EMAIL PROTECTED]> wrote: > If the union of two integers yielded a set of integers, then > it'd make more since for the union of two Intervals to yield an > IntervalSet. AFAIK union is defined over sets, not numbers, so I'm not sure what you mean by the "union of two integers". What

Re: Python Module Exposure

2005-07-09 Thread Jacob Page
George Sakkis wrote: > "Jacob Page" <[EMAIL PROTECTED]> wrote: > >>I selected option one; Intervals are immutable. However, this doesn't >>mean that __add__ has to go, as that function has no side-effects. The >>reason I chose option one was because it's uncommon for a mathematical >>operation o

Re: Python Module Exposure

2005-07-09 Thread George Sakkis
"Jacob Page" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > As I see it, there are two main options you have: > > > > 1. Keep Intervals immutable and pass all the responsibility of > > combining them to IntervalSet. In this case Interval.__add__ would have > > to go. This is simple to imple

Re: Python Module Exposure

2005-07-09 Thread Jacob Page
George Sakkis wrote: > "Jacob Page" <[EMAIL PROTECTED]> wrote: > >>I think I will keep Interval exposed. It sort of raises a bunch of >>hard-to-answer design questions having two class interfaces, though. >>For example, would Interval.between(2, 3) + Interval.between(5, 7) raise >>an error (as it

Re: Python Module Exposure

2005-07-09 Thread George Sakkis
"Jacob Page" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > There are several possible use cases where dealing directly with > > intervals would be appropriate or necessary, so it's good to have them > > supported directly by the module. > > I think I will keep Interval exposed. It sort of

Re: Python Module Exposure

2005-07-09 Thread Jacob Page
George Sakkis wrote: > "Jacob Page" <[EMAIL PROTECTED]> wrote: > >>George Sakkis wrote: >> >>>1. As already noted, ISet is not really descriptive of what the class >>>does. How about RangeSet ? It's not that long and I find it pretty >>>descriptive. In this case, it would be a good idea to change

Re: Python Module Exposure

2005-07-09 Thread George Sakkis
"Jacob Page" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > 1. As already noted, ISet is not really descriptive of what the class > > does. How about RangeSet ? It's not that long and I find it pretty > > descriptive. In this case, it would be a good idea to change Interval > > to Range to

Re: Python Module Exposure

2005-07-09 Thread Jacob Page
George Sakkis wrote: > 1. As already noted, ISet is not really descriptive of what the class > does. How about RangeSet ? It's not that long and I find it pretty > descriptive. In this case, it would be a good idea to change Interval > to Range to make the association easier. The reason I decided

Re: Python Module Exposure

2005-07-09 Thread George Sakkis
Jacob Page wrote: > Thomas Lotze wrote: > > Jacob Page wrote: > > > >>better-named, > > > > Just a quick remark, without even having looked at it yet: the name is not > > really descriptive and runs a chance of misleading people. The example I'm > > thinking of is using zope.interface in the same

Re: Python Module Exposure

2005-07-08 Thread Jacob Page
Thomas Lotze wrote: > Jacob Page wrote: > >>better-named, > > Just a quick remark, without even having looked at it yet: the name is not > really descriptive and runs a chance of misleading people. The example I'm > thinking of is using zope.interface in the same project: it's customary to > name

Re: Python Module Exposure

2005-07-08 Thread Thomas Lotze
Jacob Page wrote: > better-named, Just a quick remark, without even having looked at it yet: the name is not really descriptive and runs a chance of misleading people. The example I'm thinking of is using zope.interface in the same project: it's customary to name interfaces ISomething. -- Thoma

Re: Python Module Exposure

2005-07-07 Thread Rocco Moretti
Robert Kern wrote: > Jacob Page wrote: > >> Does this newsgroup find attachments acceptable? > > No. Please put files somewhere on the web and post a URL. This would be > a good forum to informally announce and discuss your module. To add to what Robert said, keep in mind this newsgroup is als

Re: Python Module Exposure

2005-07-07 Thread Jacob Page
Robert Kern wrote: > Jacob Page wrote: > >> I have created what I think may be a useful Python module, but I'd >> like to share it with the Python community to get feedback, i.e. if >> it's Pythonic. If it's considered useful by Pythonistas, I'll see >> about hosting it on Sourceforge or some

Re: Python Module Exposure

2005-07-07 Thread Robert Kern
Jacob Page wrote: > I have created what I think may be a useful Python module, but I'd like > to share it with the Python community to get feedback, i.e. if it's > Pythonic. If it's considered useful by Pythonistas, I'll see about > hosting it on Sourceforge or something like that. Is this a g

Python Module Exposure

2005-07-07 Thread Jacob Page
I have created what I think may be a useful Python module, but I'd like to share it with the Python community to get feedback, i.e. if it's Pythonic. If it's considered useful by Pythonistas, I'll see about hosting it on Sourceforge or something like that. Is this a good forum for exposing mo