On 06Nov2020 08:41, J.J. E. <nkopt...@gmail.com> wrote: >Thank you for allowing me in this support mailing list.
Anyone may join. Welcome! >My experience with >Python is short due to my new job. My boss told me that I need to create a >code that checks yesterday's date. The conditions for returning none are >that: > - Yesterday happens to be a holiday, > - Yesterday turns out to be a Saturday or a Sunday. >For both reasons, it needs to return None. A remark: that is unusual. Normally this would be a "logical" test: is yesterday a workholiday or not, returning True or False accordingly. Returning None will "test" as false, but it is not a normal value for false situations. What does your function return when neither situation applies? >Now I have learned to scan a >text file, and I have learned (ROUGHLY) the structure of what seems to scan >for specific words in "Indented Comments". > >The file "gwd.py" that I have joined stands for getWorkingDate. This is a text only list, and the list software discards most, if not all, attachments. Your sample file is not present in the email I received. Please paste the contents of gwd.py directly into your email (which itself should be a _reply_ to this email or your original email). Then we can see your code. Thanks, Cameron Simpson <c...@cskk.id.au> -- https://mail.python.org/mailman/listinfo/python-list