Tag Archives: Constants

Python: Reimaging Constants – Python Dev Feed

Python: Reimaging Constants A different implementation of constant for python I couldn’t find a good implementation of constants, so created my own! Let’s get started! Do checkout the complete code at https://gist.github.com/ra101/aa27ff6e437f74ca56027a8c6b166882 How it Should work class Links(ConstantClass): GITHUB = “https://github.com/ra101” WEB = “https://ra101.github.io/” LINKS = “[email protected]” class Author(ConstantClass): NAME = “〈 RA 〉” WEB…

Read More

Solidity Gas Optimizations pt.2 – Constants – Blockchain Dev Feed

Solidity Gas Optimizations pt.2 – Constants Variables in the blockchain Storing variables in memory, on a normal computer, is easy and cheap. However, blockchains are distributed systems, in which every node – or computer – has to store the data locally. That makes storing data expensive, this behavior is discouraged except where necessary. SSTORE and…

Read More

The Most Used Python String Module Constants – Python Dev Feed

The Most Used Python String Module Constants Importing string module import string Enter fullscreen mode Exit fullscreen mode the most used python string module constants digits digits: returns numbers from 0 to 9 as a string. import string print(string.digits) # 0123456789 print(type(string.digits)) # <class ‘str’> Enter fullscreen mode Exit fullscreen mode ascii_letters ascii_letters: lets you…

Read More