Files
django_lottopy/django_lottopy/lib/python3.14/site-packages/dateutil/_common.py
T
adminandClaude Opus 5.5 57d615c28f Rebuild venv for python 3.14 (alpine 3.24)
- Venv rebuilt on Python 3.14; requirements.txt is its pip freeze.
  screen and the unused django-excel-* chain are left out (screen does
  not build on 3.14).
- .gitignore: old venvs kept on the server after a Python upgrade.
- Scrapers submodule: keep a growing record of every draw (records.py).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cw9sqyxD7yx2iFAcyMfxsV
2026-10-12 18:55:06 -04:00

44 lines
932 B
Python

"""
Common code used in multiple modules.
"""
class weekday(object):
__slots__ = ["weekday", "n"]
def __init__(self, weekday, n=None):
self.weekday = weekday
self.n = n
def __call__(self, n):
if n == self.n:
return self
else:
return self.__class__(self.weekday, n)
def __eq__(self, other):
try:
if self.weekday != other.weekday or self.n != other.n:
return False
except AttributeError:
return False
return True
def __hash__(self):
return hash((
self.weekday,
self.n,
))
def __ne__(self, other):
return not (self == other)
def __repr__(self):
s = ("MO", "TU", "WE", "TH", "FR", "SA", "SU")[self.weekday]
if not self.n:
return s
else:
return "%s(%+d)" % (s, self.n)
# vim:ts=4:sw=4:et