Skip to main content

ifIf talking about code readability, i'd recomendI'd recommend you to read PEP-8PEP-8 at first, for example:

def one():
    pass
def two():
    pass

thisThis is how you don`tdon't want your code to look like. Instead, soit should look like this:

def one(): # you can add hints for this funcfunction here
    pass

def two():
    '''
    or if it`sit's documentation, you can leave it here
    '''
    pass

also it`sAlso, it's better to split strokeshave newlines between blocks of code/comments, do notcode and blocks of comments. Don't stack everything in one pile:

self.root = root # root is a passed Tk object

#Custom Window Height
#TODO! change to ratio

window_height = 700
window_width = 1000

#Get User Screen Info
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()

if talking about code readability, i'd recomend you to read PEP-8 at first, for example:

def one():
    pass
def two():
    pass

this is how you don`t want your code to look like, so:

def one(): # you can add hints for this func here
    pass

def two():
    '''
    or if it`s documentation, you can leave it here
    '''
    pass

also it`s better to split strokes of code/comments, do not stack everything in one pile:

self.root = root # root is a passed Tk object

#Custom Window Height
#TODO! change to ratio

window_height = 700
window_width = 1000

#Get User Screen Info
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()

If talking about code readability, I'd recommend you to read PEP-8 at first, for example:

def one():
    pass
def two():
    pass

This is how you don't want your code to look like. Instead, it should look like this:

def one(): # you can add hints for this function here
    pass

def two():
    '''
    or if it's documentation, you can leave it here
    '''
    pass

Also, it's better to have newlines between blocks of code and blocks of comments. Don't stack everything in one pile:

self.root = root # root is a passed Tk object

#Custom Window Height
#TODO! change to ratio

window_height = 700
window_width = 1000

#Get User Screen Info
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()

Source Link
finally
  • 141
  • 3

if talking about code readability, i'd recomend you to read PEP-8 at first, for example:

def one():
    pass
def two():
    pass

this is how you don`t want your code to look like, so:

def one(): # you can add hints for this func here
    pass

def two():
    '''
    or if it`s documentation, you can leave it here
    '''
    pass

also it`s better to split strokes of code/comments, do not stack everything in one pile:

self.root = root # root is a passed Tk object

#Custom Window Height
#TODO! change to ratio

window_height = 700
window_width = 1000

#Get User Screen Info
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()