Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7598 closed (wontfix)

SortedDict keyOrder should really be key_order

Reported by: floguy Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I know this is pedantic, but I'm sorry the camelCase just bugs me.

So I've whipped up a little patch and made sure the test suite passes. It's backwards incompatible if anyone was directly hooking into they keyOrder variable before, but as it was undocumented and theoretically private, this shouldn't really be a problem.

Attachments (1)

keyOrder_fix.diff (4.6 KB) - added by floguy 11 years ago.
Patch to replace keyOrder with key_order wherever it's used in Django.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by floguy

Attachment: keyOrder_fix.diff added

Patch to replace keyOrder with key_order wherever it's used in Django.

comment:1 Changed 11 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

I don't really see that this is worth it. No functionality is improved. No bugs are removed. It's just churn.

If it worries you so much, don't use an internal attribute in your code and you'll never have to see it. :-)

comment:2 in reply to:  1 Changed 11 years ago by anonymous

Replying to mtredinnick:
"you'll never have to see it" probably means "don't contribute, then".

IMO, inconsistent code is ugly code.
I even stumbled on inconsistent local names (clone, obj, qs, del_query) to store self._clone() in QuerySet methods.
And while this is a personal quirk, attribute naming style is well defined and you would hopefully reject patches that do not match pep8's naming conventions.

What about a coding-style keyword, so you can defer patches until you touch the code in question again for something that's "worth it"?

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