class SomeClass: SOME_CONST = "hello" SOME_OTHER_CONST = SomeClass.SOME_CONST + " world"
This does not work.
NameError: the name "SomeClass" is not defined
Is there a way to refer to a class inside a class?
You do not need a class name
class SomeClass: SOME_CONST = "hello" SOME_OTHER_CONST = SOME_CONST + " world"
Source: https://habr.com/ru/post/912563/More articles:Is this the DCPU-16 assembler 'dat' with a string that should generate a byte or word per character? - dcpu-16Synchronize time / events between a player (MMORPG) client and server? - javacannot route packets from one interface to another - linuxUnit test: claim it doesn't work? - javaUse JavaScript string as function name? - javascriptASP.Net MVC 3: Baby for Children and Redirection - asp.net-mvcHow to get navController from AppDelegate. - iosWhy does the "I" outside the function parameters give an "undefined" error? - pythonhas_many through association-dependent destruction, provided that someone called destroy - ruby-on-railsWord Count in Hive - mapreduceAll Articles