Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7598 closed (wontfix)

SortedDict keyOrder should really be key_order

Reported by: floguy Owned by: nobody
Component: Uncategorized Version: dev
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

Description

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 16 years ago.
Patch to replace keyOrder with key_order wherever it's used in Django.

Download all attachments as: .zip

Change History (3)

by floguy, 16 years ago

Attachment: keyOrder_fix.diff added

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

comment:1 by Malcolm Tredinnick, 16 years ago

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. :-)

in reply to:  1 comment:2 by anonymous, 16 years ago

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