Code

Opened 6 years ago

Closed 6 years ago

Last modified 6 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: UI/UX:

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

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by floguy

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

comment:1 follow-up: Changed 6 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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 6 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"?

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.