Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code Review?
#5
To start with - you have a huge number of prints. Make one huge multi-line string constant, preferably  - in separate module
LET_ME_OVERWHELM_YOU = '''
Starting Firewall Conversion
Current version is {version}
.....
'''
And then print it with one statement
print(LET_ME_OVERWHELM_YOU.format(version=VERSION))
(constant name - well, you overwhelmed me  Cool)
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
Code Review? - by PappaBear - Apr-18-2017, 06:06 AM
RE: Code Review? - by micseydel - Apr-18-2017, 06:24 AM
RE: Code Review? - by PappaBear - Apr-18-2017, 02:03 PM
RE: Code Review? - by micseydel - Apr-18-2017, 08:14 PM
RE: Code Review? - by PappaBear - Apr-18-2017, 10:25 PM
RE: Code Review? - by metulburr - Apr-18-2017, 10:43 PM
RE: Looking for constructive criticism, thoughts, and guidance - by volcano63 - Apr-18-2017, 07:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python best library for Excel reports & review of existing code MasterOfDestr 4 846 Feb-14-2024, 03:39 PM
Last Post: MasterOfDestr
  Review my code: convert a HTTP date header to a datetime object stevendaprano 1 2,075 Dec-17-2022, 12:24 AM
Last Post: snippsat
  Code review for S3 object creation beherap 0 2,168 Mar-29-2018, 01:31 PM
Last Post: beherap

Forum Jump:

User Panel Messages

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