Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #591 (closed enhancement: wontfix)

Opened 12 years ago

Last modified 10 years ago

Infix predicates for Identity

Reported by: simon Owned by: anonymous
Priority: normal Milestone: 1.5
Component: Identity Version:
Severity: normal Keywords: operator, infix 2.5
Cc:

Description (last modified by jorge.vargas) (diff)

As much as I love Lisp, Any and All are not exactly the pinnacle of Pythonic. Therefore I propose we overload infix operators & (and), | (or), ~ (not) and perhaps even ^ (exclusive or) for identity.Predicate.

Also when Python 2.5 hits there will be additional confusion as newly built-in  any() and all() work a bit differently than Identity's.

Change History

comment:1 Changed 12 years ago by Jeff Watkins

Of course, the existing Any and All could be made to work more like 2.5's any and all. Actually, I was thinking about making them the same... (just like we check for sets.)

I *really* dislike using the infix operators because they're the wrong operators. If we could overload 'and', 'or' and 'not', I'd be OK with it, but overloading the binary operators feels wrong.

comment:2 Changed 11 years ago by jorge.vargas

  • Keywords 2.5 added
  • Status changed from new to closed
  • Resolution set to wontfix
  • Description modified (diff)
  • Milestone changed from 1.0 to 1.1

I'm closing this in favor of #1121

Note: See TracTickets for help on using tickets.