Opened 10 years ago

Last modified 3 months ago

#22712 closed Cleanup/optimization

Consider not using built-in functions as parameters — at Initial Version

Reported by: no Owned by: nobody
Component: contrib.staticfiles Version: dev
Severity: Normal Keywords:
Cc: no Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently the staticfiles finders' find function has a paramter all which is also a built-in function. Personally, I consider using built-ins as parameters/variables to be bad form, and would usually just rename the parameter in my subclasses. Unfortunately, find is explicitly called with all=all in django.contrib.staticfiles.finders.find(). So, to use the built in all() one needs to use from __builtin__ import all as all_.

There are probably more examples throughout the codebase, but this is the one I've run into.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top