On Mon, Mar 9, 2015 at 11:46 AM, Steven D'Aprano <st...@pearwood.info>
wrote:

> On Mon, Mar 09, 2015 at 09:52:01AM -0400, Neil Girdhar wrote:
>
> > Here is a list of methods on
> > int that should not be on IntFlags in my opinion (give or take a couple):
> >
> > __abs__, __add__, __delattr__, __divmod__, __float__, __floor__,
> > __floordiv__, __index__, __lshift__, __mod__, __mul__, __pos__, __pow__,
> > __radd__, __rdivmod__, __rfloordiv__, __rlshift__, __rmod__, __rmul__,
> > __round__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__,
> > __sub__, __truediv__, __trunc__, conjugate, denominator, imag, numerator,
> > real.
> >
> > I don't think __index__ should be exposed either since are you really
> going
> > to slice a list using IntFlags?  Really?
>
> In what way is this an *Int*Flags object if it is nothing like an int?
> It sounds like what you want is a bunch of Enum inside a set with a custom
> __str__, not IntFlags.
>
>
It doesn't matter what you call it.  I believe the goal of this is to have
a flags object with flags operations and pretty-printing.  It makes more
sense to me to decide the interface and then the implementation.

>
> --
> Steve
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/mistersheik%40gmail.com
>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to