Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is PEP-8 dead?
#3
(Oct-20-2018, 11:07 AM)snippsat Wrote:
(Oct-20-2018, 09:39 AM)volcano63 Wrote: Aren't you tired of the herds of camelCase in the demonstrated code?
Sure,but can not do anything else than mention that camelCase is not okay style in Python.

Noone usually bothers to.

(Oct-20-2018, 11:07 AM)snippsat Wrote:
(Oct-20-2018, 09:39 AM)volcano63 Wrote: Shouting out bad code practices
No need to shout it out,can mention PEP-8,an give example with better code style.
A site pep8.org with better CSS layout for PEP-8.

"Bad programming practice" is not necessarilly PEP-8 - some glaring examples
  • Redundant (and ugly) boolean tests cond == True and cond is True
  • Comprehensions to call functions in a loop [print(obj) for obj in objects]
  • Redundant elses and continues (I loved continue Snooty in the last conditional expression in the loop Naughty )
, and last time I tried, I got an extensive lesson in Brainfuck Doh .

Considering that advice to abandon Python 2 is given freely, I find it strange that noone bothers to help educate newbies in Python do nots. Sometimes not for the sake of the poster (who may be quite a PITA about accepting constructive criticism), but for the sake of another newbies who do not know better.
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
Is PEP-8 dead? - by volcano63 - Oct-20-2018, 09:39 AM
RE: Is PEP-8 dead? - by snippsat - Oct-20-2018, 11:07 AM
RE: Is PEP-8 dead? - by volcano63 - Oct-20-2018, 11:26 AM
RE: Is PEP-8 dead? - by snippsat - Oct-20-2018, 12:57 PM
RE: Is PEP-8 dead? - by ichabod801 - Oct-20-2018, 02:06 PM
RE: Is PEP-8 dead? - by volcano63 - Oct-20-2018, 02:52 PM
RE: Is PEP-8 dead? - by buran - Oct-20-2018, 03:02 PM
RE: Is PEP-8 dead? - by wavic - Oct-20-2018, 03:32 PM
RE: Is PEP-8 dead? - by metulburr - Oct-20-2018, 06:15 PM
RE: Is PEP-8 dead? - by nilamo - Oct-25-2018, 12:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is comp.lang.python dead? Winfried 3 4,755 Aug-25-2018, 12:04 AM
Last Post: metulburr
  WYSIWYG dead, source mode enabled metulburr 0 2,846 May-31-2017, 01:26 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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