Python for C++ Developers [closed]

I'm a long time C++/Java developer trying to get into Python and am looking for the stereotypical "Python for C++ Developers" article, but coming up blank. I've seen these sort of things for C#, Java, etc, and they're incredibly useful for getting up to speed on language features and noteworthy differences. Anyone have any references?

As a secondary bonus question, what open source Python program would you suggest looking at for clean design, commenting, and use of the language as a point of reference for study?

Thanks in advance.


Asked by: Agata978 | Posted: 24-09-2021






Answer 1

I never really understood the "Language X for Language Y developers" approach. When I go looking to learn Language X I want to learn how to program in it the way that Language X programmers do, not the way Language Y programmers do. I want to learn the features, idioms, etc. that are unique to the language that I am learning. I want to be able to take advantage of the things that make the language special and use that knowledge to expand my ways of thinking and solving problems. I don't think I would get the same sort of insights from a tutorial that was framed in the context of another language. If you can learn your first language without a tutorial geared towards something you already know you should be able to pick up a second language the same way (and in my experience, the more languages you know the easier it is to learn new ones).

With that said, I would recommend The Python Tutorial as a good, quick, and easy way to get going with Python and Dive Into Python as a more complete introduction, also available for free here. I would also agree with what others have said regarding looking at the code for the standard libraries as a source of good examples and design practices, the standard python libraries are pretty clean and easy to read.

Answered by: Melissa355 | Posted: 25-10-2021



Answer 2

Dive Into Python is a Python book for experienced programmers.

Answered by: Lily579 | Posted: 25-10-2021



Answer 3

Dive Into Python is great, but don't forget PJE's Python Is Not Java.

Answered by: Michael119 | Posted: 25-10-2021



Answer 4

I learned a lot about Python by reading the source of the standard library that ships with Python. I seem to remember having a few "a-ha!" moments when reading urllib2.py in particular.

Answered by: Ted944 | Posted: 25-10-2021



Answer 5

To learn the language the free and online python tutorial is really all that you need to pick up the language and start writing apps. If you want a book, I've found Beginning Python from Apress to be an excellent reference and tutorial. Of course the best way to learn a language is to write code, thus I would recommend that you check out Boost.Python. If you have a C++ that needs to be a bit more flexible, Boost.Python can give you a good excuse to learn Python and get paid for it.

Answered by: Elise877 | Posted: 25-10-2021



Answer 6

Python is sufficiently different from C++ so that specific knowledge can't normally be transferred. There are a few language comparisons available. What you can carry over is knowledge of specific APIs, e.g. of the POSIX or socket APIs.

As an example for a typical Python (GUI) application, look at IDLE (as shipped for Python).

Answered by: Alberta207 | Posted: 25-10-2021



Answer 7

C# and Java are seen as cleaner replacements for C++ in many application areas so there is often a "migration" from one to the other - which is why there are books available.

Python and C++ are very different beasts, and although they are both considered general purpose programming languages they are targetted towards different ends of the programming spectrum.

Don't try to write C++ in Python; in fact, try to forget C++ when writing Python. I found it far better to learn the common Python paradigms and techniques and apply them to my C++ programs than the other way around.

Answered by: Owen177 | Posted: 25-10-2021



Answer 8

For the best examples of code of a language, the language's standard library is often a good place to look. Pick a recent piece, though - old parts are probably written for older versions and also sometimes were written before the library became big enough to warrant big standards - like PHP and Erlang's libraries, which have internal inconsistency.

For Python in particular, Python 3000 is cleaning up the library a lot, and so is probably a great source of good Python code (though it is written for a future Python version).

Answered by: Sawyer280 | Posted: 25-10-2021



Similar questions

What tools do web developers use with PHP, Ruby on Rails, Python, etc?

A good friend just sent me the following email My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, he’s proposing they teach web design and web development. My question is in your opinion what are the “industry standard” tools for both web design and web development. I think I have a good handle on the web design (html, flash, ...


python - Where are some good places to reach great Django developers?

Are there communities where expert Django developers (ideally looking for jobs) like to hang out? Stackoverflow excluded :)


python - Send user's email to developers email django

Lets say i have an email when a user logs in . Could there a way to recieve an email that {user's email} has logged in and for log outs too. I have tried to do reaserch on this but didnt know how to start as i am a new to making websites


python - Hello developers how you doin'? I need your help right now! this is issue by for loop

here in my awful django project i encountered loop error. I am good at loops such as while and or, but I don't know why this is happening!? I would be very glad if you could reply this issue thanks... here is my views.py file Main goal doing this I want to attach address of participant to whole bunches of data (types of models and models_of_address are in dict)


What tools do web developers use with PHP, Ruby on Rails, Python, etc?

A good friend just sent me the following email My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, he’s proposing they teach web design and web development. My question is in your opinion what are the “industry standard” tools for both web design and web development. I think I have a good handle on the web design (html, flash, ...


python - Where are some good places to reach great Django developers?

Are there communities where expert Django developers (ideally looking for jobs) like to hang out? Stackoverflow excluded :)


python - Tools to help developers reading class hierarchy faster

I mostly spend time on Python/Django and Objective-C/CocoaTouch and js/jQuery in the course of my daily work. My editor of choice is vim for Python/Django and js/jQuery and xcode for Objective-C/CocoaTouch. One of the bottlenecks on my development speed is the pace at which I read existing code, particularly open source libraries which I use. In Python/Django for example, w...


python - Why did some very likely PEP8 aware developers capitalize their package names? (examples: Django, Sphinx, Fabric, ... )


python - Why am I getting these Django security warnings, but not other developers on the team

I am currently getting the following Django security warnings when running makemigrations: System check identified some issues: WARNINGS: ?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS care...


python - Django Model Entries Not Available to Other Developers

I have manually added entries (rows) to the models in my Django project through the admin interface. I have also ran the following commands python3 manage.py makemigrations & python3 manage.py migrate The issue is I am the only one that can see the data in the database, and other developers cannot see them. They are all using the same project files as present on my ...


python - Managing sys.path for multiple developers

The problem I'm facing is small but annoying: A colleague is working on one project in version control system X (VCS-X). Another colleague is working in another version control system Y and uses the packages from X. Unfortunately colleague in VCS-X uses local import and modifies his path using sys.path.append('trunk/my_location') in their code. My view is that this is wrong practice a...


python - line developers token permission issue

I use the following simple code to test my line userid and push message. I found my line token can't query other person profile and push message to others. It seems to be a token problem. Because i use my friend's token every thing is fine. Did anyone encounter the same problem? Many thanks. Following is my code. by the way the token is real toke...


numpy - How does python web developers in general include the required python modules?

I am writing a code in python that uses numpy, matplotlib etc. How to make sure that even a remote web server with python installed but no extra modules, can run the code without errors? I usually work on linux environment. Hence from source code, I can install the libraries in a prefix directory and can keep that along with my code. Then add pythonpath locally in my python code to use the directory.


How to live stream large log file from remote server whenever it's updated to 100 of developers locally using python

Problem statement is that there's a large log file which needs to be read once but needs to live stream logs whenever the file registers new entry. The file should be available to 1000 developers locally.






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top