Python Forum
getting the source line number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting the source line number
#11
(Dec-16-2017, 03:33 AM)Larz60+ Wrote: I would expect globals to work if not overridden.
I avoid globals like the plague.
so where do you put your function definitions?

there are cases where globals are the right way.  besides that, and besides short experiments, i avoid them, too.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#12
Quote:there are cases where globals are the right way.
Few and far between.
I have used them when I had to write something on the fly, that was throw away code, but I can't remember the last time.
Oh course, i often,  can't remember what I had for breakfast .
Reply
#13
so where do you put your function definitions?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Printing the code line number arbiel 6 463 Jun-30-2024, 08:01 AM
Last Post: arbiel
  Sequential number for rows retrieved and storing the Primary UKey to the line number GYKR 2 727 Aug-22-2023, 10:14 AM
Last Post: GYKR
  line number of first and second occurance of string in a file mdalireza 1 1,934 Nov-18-2019, 09:55 AM
Last Post: perfringo
  Search for the line number corresponding to a value Lali 0 1,723 Oct-22-2019, 08:56 AM
Last Post: Lali
  print number of a list line per line lateublegende 2 2,849 Mar-20-2019, 04:07 PM
Last Post: lateublegende
  Adding a line number to an lxml Element vindy 0 3,520 Mar-08-2019, 08:34 PM
Last Post: vindy
  What are ways of pointing cross-compiled origin source line for python? wyvogew 2 2,962 Feb-02-2019, 03:16 PM
Last Post: wyvogew
  get the number in the line in text file lateublegende 2 2,656 Jan-29-2019, 06:03 PM
Last Post: lateublegende
  Uncanny line of code in Torchat source file pkm 2 2,832 Jan-05-2019, 04:01 PM
Last Post: pkm
  i woule a way to parse a line python source like split Skaperen 2 2,918 Nov-11-2018, 07:35 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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