Python Forum
compiling to python-- should ; be used or not?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compiling to python-- should ; be used or not?
#1
the way i code uses ; a lot-- it puts statements together like this:

print(5) ; print (12)
the reason i do this is because it fits more code per page, which makes it easier (for me) to read what im doing.

of course, the convention / recommendation is to not do that:

print(5)
print (12)
im aware that there are various ways to combine these statements together in purpose, but two print statements was just an example.


if you were writing (or cleaning up) a compiler that output python code, and it combined (some, not all) statements with ; like that, would you change it from the first way?

print(5) ; print (12)
and have it output python code the second way?

print(5)
print (12)
if so, why? and if not, why?


not a quiz, im very interested in peoples opinions (brief or otherwise) on this sort of thing in general. im always trying to understand peoples opinions on this. my preferences are already noted, im asking should i learn something. im sure that happens more often than its expected, at least.

i never even indented code (for almost 20 years) until i learned python. now i prefer it.
Reply


Messages In This Thread
compiling to python-- should ; be used or not? - by ezdev - Dec-24-2017, 03:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  compiling with an undefined variable Skaperen 0 1,029 Nov-10-2022, 11:59 PM
Last Post: Skaperen
  compiling numpy, getting C source Skaperen 10 3,809 Nov-20-2021, 12:41 AM
Last Post: Skaperen
  python compiling and sql? abrogard 2 2,331 Oct-27-2020, 06:37 AM
Last Post: buran
  cross-compiling python with zlib support michelebucca 5 5,932 Aug-25-2020, 08:19 PM
Last Post: carterb
  compiling various versions of Python, which toolchain? Skaperen 4 2,773 Jun-06-2019, 06:28 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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