Jump to content
  • Advertisement
Sign in to follow this  
Kiryn

Python: Questions about Python

This topic is 4042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a few questions while learning Python. 1. How would I make a variable private? 2. How can I make a readonly variable? a Write only variable? 3. Wheres a list of all these __x__ located so I can know how to use everyone of just know what they mean and do? These are all I can think of so far.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Kiryn
1. How would I make a variable private?
2. How can I make a readonly variable? a Write only variable?
3. Wheres a list of all these __x__ located so I can know how
to use everyone of just know what they mean and do?


Generally Python programmers don't want to make variables private. You can probably achieve your readonly/writeonly needs using properties, though they're not all that common either.

Note also that TStrimp has linked you to very old Python docs. Look up the equivalents in the newer docs before going on what you read there.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!