[issue18537] bool.toggle()

2013-07-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: FYI, the itertools module has ifilterfalse() for inverse filtering. -- nosy: +rhettinger resolution: invalid -> rejected ___ Python tracker _

[issue18537] bool.toggle()

2013-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: If that's your concern, you can use operator.not_. >>> import operator >>> filter(operator.not_, [False, True, False, False, True]) [False, False, False] -- ___ Python tracker

[issue18537] bool.toggle()

2013-07-23 Thread James Lu
James Lu added the comment: well, filter() could take the function not lambda x:not x james On Tue, Jul 23, 2013 at 12:23 PM, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Since it would be the same as "not value", I can't imagine this would be > added to the language. > >

[issue18537] bool.toggle()

2013-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: Since it would be the same as "not value", I can't imagine this would be added to the language. -- ___ Python tracker ___ __

[issue18537] bool.toggle()

2013-07-23 Thread James Lu
James Lu added the comment: I mean, return a value, some people like this style. james On Tue, Jul 23, 2013 at 12:10 PM, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > bool instances are immutable, so all "value.toggle()" could do is the same > as "not value". That is, return a

[issue18537] bool.toggle()

2013-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: bool instances are immutable, so all "value.toggle()" could do is the same as "not value". That is, return a new bool with the "toggled" value. -- nosy: +eric.smith resolution: -> invalid status: open -> closed ___ P

[issue18537] bool.toggle()

2013-07-23 Thread James Lu
New submission from James Lu: the bool type should have a toggle() function -- messages: 193608 nosy: James.Lu priority: normal severity: normal status: open title: bool.toggle() type: enhancement versions: Python 3.5 ___ Python tracker