Is there any backport for the following methods to work with python 2.4:
any, all, collections.defaultdict, collections.deque
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, at least for
anyandallit’s easy:dequeis already in 2.4.As for
defaultdict, I guess you can emulate that easily withsetdefault().Quoting from Alex Martelli`s (and others’) highly recommended Python Cookbook: