In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to enter the Python language". In daily operation, I believe many people have doubts about how to enter the Python language. The editor has consulted all kinds of materials and sorted out simple and easy operation methods. I hope to help you answer the doubts about "how to enter the Python language"! Next, please follow the small series to learn together!
Python family
The first thing to mention is the relationship between Python language and Python implementation. A computer language itself can be said to be a specification, and a good example is Scheme. R5RS is a specification document of Scheme language, which basically stipulates the rules of language, syntax and other aspects. But documentation alone is definitely not enough, so someone will implement a usable language compiler or interpreter according to the language specification. For Python, the language specification is in the documentation, ThePython Language Reference. Python is often called CPython, which is officially available and one of the most widely used implementations. Python is a popular language with many different implementations. Here are a few other Python implementations, and some Python-derived languages.
PyPy
If you follow Python news a lot, you must have seen PyPy. In summary, the goal is to achieve a Python implementation that is fully compatible with Python but much faster. In the official review page, you can see that PyPy is now about 5 times faster than CPython. However, PyPy has a troublesome problem of its own, which is that it is not compatible with C extensions, which is one reason why it has been difficult to gain popularity.
PyPy is pretty mature for the average user like me. Py2.0 is now a Python 2.7 compatible version, where most of the standard library content is usable, and most of the pure Python libraries have no problems. Official package downloads now include various versions of Windows. You can try PyPy for yourself to see if it makes your program run faster. If you can, you'll get a performance boost with absolutely no effort, which is one of the attractions of PyPy.
PyPy itself, on the other hand, provides a framework for developing language interpreters. The official blog has an article on how to write a simple Brainfuck interpreter.
IronPython
IronPython is a Python implementation for Microsoft. Net. In fact, this is basically an open source project from Microsoft, and the DLR it uses is also an important new feature in. Net 4.0.
I tried IronPython earlier due to work reasons, and it felt really... Stunned. If you've tried embedding Lua or other scripting languages into C/C projects, you'll find it hard to get them to run properly. At the very least, you have to deal with exposing C functions or C classes to scripting languages, handling exceptions in scripts, and so on. Anyway, it's a hassle.
But if you use IronPython, you basically have very little to worry about. Class can be directly exposed to IronPython, C#can be directly connected to exceptions in IronPython, and it is easy to get values or Class in IronPython. And IronPython makes it easy to use classes in. Net, in fact you can write WinForms programs in IronPython. All in all, it was too convenient.
IronPython is not much different from CPython in terms of efficiency. But if you're a. Net developer, you should definitely check out IronPython. There might be a chance to use it.
In contrast to the. Net platform, there is also a Jython project on Java. But I haven't used it at all, so there's nothing to say.
Cython
"Where Python lacks performance, you can rewrite it in C to improve efficiency"-I guess you've seen something like that somewhere. But how exactly should this be done? To be honest, rewriting Python modules in C is a bit of a hassle. The good news is that Cython is a project that addresses this problem. Cython provides a strongly typed language similar to Python that can be compiled into C code, which you can then easily compile into Python C extension.pyd files. pyd file is actually dll under Windows, if you use Cython, you can save a lot of trouble.
But the bad news is that everything that comes to C is a pain in the ass on Windows. Cython configuration is also relatively complex. The good news is that you can still get everything done by installing the awesome PythonXY.
Similar to the target Cython, frameworks that call C/C native code extensions include cffi,swig, and ctypes in the standard library.
Python has become one of the top five popular programming languages in the world. The future artificial intelligence era will be Python's world. Learning Python is an opportunity given by the times. Seize the opportunity and achieve life.
At this point, the study of "Is it good to enter the Python language" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.