Python Forum
The most outrageous moments of my career
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The most outrageous moments of my career
#26
(Jun-06-2017, 03:53 PM)micseydel Wrote: Rather than adding that comment, why not do the typical
# -*- coding: <encoding name> -*-
?
I got the impression that this is recommended form for files without interpreter line - see PEP-263. And, I've already implied
  • This line looks too artificial to be user comments (well, my level of English is much higher than that of my colleagues)
  • This was the only change made to the file in the commit  Wall - and this line was there for a long time


(Jun-06-2017, 03:53 PM)micseydel Wrote: Also, annotations are more than just cosmetic. They allow static analysis tools to notify you of mistakes in a way similar to a statically typed language. In theory....

I can tell you a joke about the difference between in theory and in practice - but I will be banned for foul language Snooty . In practice, we don't use any analysis tools - and creating circular import is bad. Both in theory and in practice.

Making changes to files after running tests is bad practice altogether - in my humble. Breaking builds Hand ....
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Messages In This Thread
RE: The most outrageous moments of my career - by volcano63 - Jun-06-2017, 04:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Career change. Advice hugely appreciated! JABedford 5 3,768 Sep-28-2017, 05:51 AM
Last Post: JABedford
  best python specialization to career at home with? meems 0 3,261 Dec-21-2016, 02:04 AM
Last Post: meems

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020