Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what functional tools remain in Python 3k?

I have have read several entries regarding dropping several functional functions from future python, including map and reduce.

What is the official policy regarding functional extensions?
is lambda function going to stay?

like image 782
Anycorn Avatar asked Dec 14 '22 01:12

Anycorn


1 Answers

Well, Python 3.0 and 3.1 are already released, so you can check this out for yourself. The end result was that map and filter were kept as built-ins, and lambda was also kept. The only change was that reduce was moved to the functools module; you just need to do

from functools import reduce

to use it.

Future 3.x releases can be expected to remain backwards-compatible with 3.0 and 3.1 in this respect.

like image 178
musicinmybrain Avatar answered Dec 27 '22 19:12

musicinmybrain