Python Forum
makingVariable declaration mandatory
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
makingVariable declaration mandatory
#5
What you want is linter, such as pylint. This won't involve declarations, but it will detect typos much like a language with variable declaration.

Personally, I try to follow a function-programming style of not reassigning variable names. While that won't catch typos in use before runtime, it prevents accidentally naming a second variable with a typo'd name.
Reply


Messages In This Thread
RE: makingVariable declaration mandatory - by buran - Aug-25-2018, 04:01 PM
RE: makingVariable declaration mandatory - by micseydel - Aug-26-2018, 05:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  dynamic variable name declaration in OOP style project problem jacksfrustration 3 2,170 Oct-22-2023, 10:05 PM
Last Post: deanhystad
  Variable declaration Asraful_Islam 5 4,141 Mar-25-2021, 05:31 PM
Last Post: nilamo
  Is it mandatory to call superclass init inside the class init? psolar 3 10,375 Feb-14-2020, 09:16 PM
Last Post: wavic
  Help in Class declaration KranthiYamanki 1 2,461 May-30-2019, 10:51 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

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