1
0
mirror of https://github.com/django/django.git synced 2025-03-24 00:00:45 +00:00

Fixed #31313 -- Fixed is_upperclass() example in enumeration types docs.

This commit is contained in:
Andrey Doroschenko 2020-02-27 08:26:52 +03:00 committed by Mariusz Felisiak
parent f283ffaa84
commit f1016814d8

View File

@ -204,7 +204,10 @@ choices in a concise way::
)
def is_upperclass(self):
return self.year_in_school in {YearInSchool.JUNIOR, YearInSchool.SENIOR}
return self.year_in_school in {
self.YearInSchool.JUNIOR,
self.YearInSchool.SENIOR,
}
These work similar to :mod:`enum` from Python's standard library, but with some
modifications: