Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python3 newbie
#5
some additional PEP8 observations
Output:
1. Place all imports on separate lines import serial import time # import random 2. def readData(): def updateValue(...) should not contain capital letters, use under score: 3. chamge: ''' use t_btn.config('text')[-1] to get the present state of the toggle button ''' to: """ use t_btn.config('text')[-1] to get the present state of the toggle button """ 4. import statement time not used 5. typo in 'meassages': GPIO.setwarnings(False) # disable annoying warning meassages
these are not show stoppers, rather PEP8 conformance
Reply


Messages In This Thread
Python3 newbie - by tony1812 - Jul-26-2017, 01:46 PM
RE: Python3 newbie - by nilamo - Jul-26-2017, 04:20 PM
RE: Python3 newbie - by tony1812 - Jul-27-2017, 09:18 AM
RE: Python3 newbie - by sparkz_alot - Jul-27-2017, 01:14 PM
RE: Python3 newbie - by Larz60+ - Jul-27-2017, 01:53 PM
RE: Python3 newbie - by tony1812 - Jul-27-2017, 03:20 PM
RE: Python3 newbie - by Larz60+ - Jul-27-2017, 05:16 PM
RE: Python3 newbie - by tony1812 - Jul-27-2017, 05:48 PM
RE: Python3 newbie - by Larz60+ - Jul-27-2017, 06:32 PM
RE: Python3 newbie - by tony1812 - Jul-27-2017, 07:47 PM
RE: Python3 newbie - by Larz60+ - Jul-27-2017, 08:01 PM
RE: Python3 newbie - by tony1812 - Jul-28-2017, 12:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 4,988 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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