Re: Python Endenting

Assuming "c, addr = s.accept()" is a variable declaration, then you are using too many indents. Indentation in Python is used to determine what lines are appart of a code block, so if those lines are all part of one single code block, in this case the while statement, then they should be all the same indentation. Adding code blocks within code blocks, such as with if statements or other functions, is when you'd start using deeper indentation. Example:

while True:
tab c, addr = s.accept()
tab print "Thank you for connection.",
tab if addr != None:
tab tab print "This IP address is: ", addr
tab c.close()


_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : hurstseth405 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector

Reply via email to