Closed
Description
Similar to Python 3, we could have /
return a float, and add another operator, maybe //
(though that means an empty regex right now, but we could alternatively use %r()
for that).
So:
# Now
1 / 2 # => 0
# With this change
1 / 2 # => 0.5
1 // 2 # => 0
I'm not 100% sure about this, mainly because:
- what type should the result be?
Float64
? x /= 2
changes the type ofx
, while previously it doesn't, but one could usex //= 2
now
I'm cc-ing @pbrusco because he originally proposed this :-)
Thoughts?
Activity