Straw Poll: Redefine Constants Exception

  • Date: 2022-01-23
  • Author: Mark Randall,
  • Status: Strawpoll

There have been a discussions in the past about upgrading the attempted redeclaration of constants to be an exception (ValueError).

Here is one from 2016 from Dmitry:


Since this RFC was made in 2016, attempted redeclaration was promoted to a warning instead of a notice.

As internals has been making efforts in recent years to move towards saner error handling this seems like a suitable candidate for tightening up, so I would like to collect opinions on how many people would be in favour of bumping this warning once more up to an exception (likely a ValueError) on the basis that attempting to redefine a constant is impossible, so is a programming error.

Strawpoll: Promote attempts at redeclaring constants to Exception
Real name Yes - In 8.2 Yes - In 9.0 No - Leave as Warning
asgrim (asgrim)   
beberlei (beberlei)   
brzuchal (brzuchal)   
cmb (cmb)   
colinodell (colinodell)   
crell (crell)   
derick (derick)   
dharman (dharman)   
girgias (girgias)   
ilutov (ilutov)   
jhdxr (jhdxr)   
kelunik (kelunik)   
mcmic (mcmic)   
ocramius (ocramius)   
tandre (tandre)   
theodorejb (theodorejb)   
villfa (villfa)   
Count: 1 16 0
redefine_constants_exception_strawpoll.txt · Last modified: 2022/01/23 03:31 by marandall