Hello everyone,
thanks for all the suggestions. I did effort to redesign parts of the
data structure the last days, but not all (only those I could easily
keep track of in my code).
For the rest I add +1 before the presentation and comment it. Seems
the easiest way now.
Andreas
--
http://mail.py
Hi Andreas,
On 2010-08-03 12:15, Andreas Pfrengle wrote:
> On 3 Aug., 03:22, Carl Banks wrote:>
> Thinking about it, it might really be dangerous to coerce always to
> int1, since sometimes I might want a normal int as result (I can't
> tell yet for sure).
Yes, that way your problem may shift fr
Hi Andreas,
On Aug 3, 2010, at 1:52 AM, Andreas Pfrengle wrote:
I'm trying to define a subclass of int called int1. An int1-object
shall behave exactly like an int-object, with the only difference that
the displayed value shall be value + 1 (it will be used to display
array indices starting at 1
Jean-Michel Pichavant wrote:
Andreas Pfrengle wrote:
On 3 Aug., 03:22, Carl Banks wrote:>
You are creating an object that differs from a built-in, int, in a
highly misleading way that only makes sense in a very limited context,
and this object's modified behavior gives no clue that it's been
Andreas Pfrengle wrote:
On 3 Aug., 03:22, Carl Banks wrote:>
You are creating an object that differs from a built-in, int, in a
highly misleading way that only makes sense in a very limited context,
and this object's modified behavior gives no clue that it's been
modified in such as way. (T
> On Aug 3, 5:15 am, Andreas Pfrengle wrote:
>
> Seems I end up with your suggestion - if noone else has an idea ;-)
START_COUNTING_FROM_HERE = 1
--
http://mail.python.org/mailman/listinfo/python-list
On 3 Aug., 03:22, Carl Banks wrote:>
> You are creating an object that differs from a built-in, int, in a
> highly misleading way that only makes sense in a very limited context,
> and this object's modified behavior gives no clue that it's been
> modified in such as way. (That is, it's not possi
On Aug 2, 6:52 pm, Andreas Pfrengle wrote:
> I'm trying to define a subclass of int called int1. An int1-object
> shall behave exactly like an int-object, with the only difference that
> the displayed value shall be value + 1 (it will be used to display
> array indices starting at 1 instead of 0)
On Aug 2, 4:52 pm, Andreas Pfrengle wrote:
> I'm trying to define a subclass of int called int1. An int1-object
> shall behave exactly like an int-object, with the only difference that
> the displayed value shall be value + 1 (it will be used to display
> array indices starting at 1 instead of 0).
On Aug 2, 6:52 pm, Andreas Pfrengle wrote:
> I'm trying to define a subclass of int called int1. An int1-object
> shall behave exactly like an int-object, with the only difference that
> the displayed value shall be value + 1 (it will be used to display
> array indices starting at 1 instead of 0).
I'm trying to define a subclass of int called int1. An int1-object
shall behave exactly like an int-object, with the only difference that
the displayed value shall be value + 1 (it will be used to display
array indices starting at 1 instead of 0). Right now I have:
class int1(int):
def __str__
11 matches
Mail list logo