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 implement, but it's
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 on two objects
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 I'm
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 the union of two
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 wink.
However, I'm not sure I like the idea
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 project: it's
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 Interval
to Range
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 raises a
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 currently
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.
--
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
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
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 good
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 something
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 also
15 matches
Mail list logo