什么是Python的大问题? [英] What's the big fuzz about Python?

查看:76
本文介绍了什么是Python的大问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Python时看到了一些有趣的AI课程,所以在购买课程之前我决定学习一些Python。到目前为止它看似相当规律:只是另一种通用语言,带有一些语法上的含糖。这让我觉得如果我选择另一种使用我已经知道的语言(c#,java,c ++)的课程并不好。



尽管如此,我对Python似乎正在获得动力这一事实感到好奇。为什么?这似乎是一种相当常规的语言。我不太明白这是多么美妙。也许我必须更深入地了解。



我尝试过的事情:



只需要完成基本语法:声明,运算符,比较,函数。

I've seen some interesting courses in AI using Python, so before buying the courses I decided to learn some Python. So far it seems fairly regular: just another general purpose language with some syntactical sugaring. Which makes me think if I am not better off picking another course which uses any language I already know ( c# , java , c++ ).

Still, I am intrigued by the fact that Python seems to be gaining momentum . Why? It seems like a fairly regular language. I don't quite understand what's so wonderfull about it. Maybe I have to dwelve deeper to find out.

What I have tried:

Just going through the basic syntax : declarations, operators, comparision, functions.

推荐答案

这是基于你自己的经验的其中一个问题用相关技术的东西和意见。



我是一名工程师,我认为编程是一个重要的工具。我已经用C / C ++开发多年了,所以我对这门语言非常熟悉,可以让它做任何我需要的东西,我知道代码会非常快。问题是......编写一些基本的东西可能很麻烦。那就是你必须准备好扩展你的技巧......



Python ...所以这种语言写得快捷方便,可以像快速的C / C ++(因为C / C ++代码可以很容易地连接到Python),拥有广泛的库,比其他流行语言更快地扩展和增长。



积极的例子:如果你必须解析一些随机文本文件,在C ++中,这可能很麻烦,在Python中,它实际上可以是一个包含几行代码的文件!需要做一些快速数学,好吧......我们可以使用像Octave这样的东西,但Python现在也有很棒的数学库,并且可以通过命令提示符进行交互(即你可以从命令提示符访问所有内容)。


否定:是的,有一些......好吧,习惯使用C ++意味着你希望所有的代码最初由编译器担保你甚至尝试做任何事情,以便至少你知道语法是正确的。好吧,Python是一种解释性语言,所以它立刻就会消失。这并不总是被认为是消极的,但实际上可能会导致问题潜入代码并且直到后来当某人实际尝试运行该代码时才被检测到(单元测试变得很重要!)。



无论如何,我可以继续,但这是一个好的开始。
This is one of those questions that's based a lot on your own experience with something and opinion of related technologies.

I'm an engineer and I see programming as an important tool in my bag of tricks. I've been developing with C/C++ for years so I'm very familiar with the language and can make it do just about anything I need and I know the code will be pretty darn fast. The problem is... it can be cumbersome to code some basic things. That's where you have to be ready to expand your bag of tricks...

Python... so this language is quick and easy to write, can be just as fast as C/C++ (since C/C++ code can be easily interfaced into Python), has extensive libraries, is expanding and growing a lot quicker than other popular languages.

Example of positives: If you have to parse some random text file, in C++, that can be cumbersome, in Python, that can literally be a file with a few lines of code! Need to do some quick math, well... we can use something like Octave but Python has great math libraries now too and can be similarly be interacted with through a command prompt (i.e. you have access to everything from the command prompt).

Negatives: Yes, there are some... well, being used to C++ means that you expect all of your code to be initially "vouched for" by the compiler before you even attempt to do anything so that at least you know the syntax is correct. Well, Python is an interpreted language so that goes out the window right away. That's not always considered a negative but essentially that can lead to problems sneaking into code and not being detected until way later when someone actually tries to run that piece of code (unit testing becomes important!).

Anyway, I can probably go on and on but that's a good start.


引用:

Python似乎正在获得动力。为什么?

Python seems to be gaining momentum . Why?

为什么不呢?与所有语言一样,Python提供了一些很容易使用的很好的功能。

Why not? Python, like all languages, offers some nice features which people find easy to work with.


这篇关于什么是Python的大问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆