Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I name a variable with acronym?

For example in Java for Data Transfer Object I use as:

ExampleDTO exampleDTO = new ExampleDTO();

So, if I am following PEP 8 (lower_case_with_underscores), what naming convention should I use for similar in Python?

like image 840
Vishal Avatar asked Dec 13 '25 07:12

Vishal


1 Answers

The style most agreeing with PEP-8 would probably be...

example_dto = ExampleDTO()

like image 97
FogleBird Avatar answered Dec 14 '25 20:12

FogleBird



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!