Opened 7 years ago

Closed 7 years ago

#12796 closed (wontfix)

Change in django.db.models.options.get_verbose_name

Reported by: rafaelsdm Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In order to make the code more readable I suggest to change the lambda function to a named function (def), simple like this:

def get_verbose_name(class_name):
   return re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1',class_name).lower().strip()

It came up in the Brazilian Django list[1].

[1] - pt_BR: http://groups.google.com/group/django-brasil/browse_thread/thread/e890880455d568ec

Change History (1)

comment:1 Changed 7 years ago by Russell Keith-Magee

Resolution: wontfix
Status: newclosed

I'm not sure I understand why this is any clearer, and my portuguese isn't good enough to follow the discussion on the referenced mailing list. If you can explain why this has caused confusion, please reopen.

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