Advertisement

In love with Pyhon ^-^

Started by March 15, 2003 02:08 PM
45 comments, last by Drevay 21 years, 8 months ago
Wow, I know C++ is great, but Python, not losing any of the functionality of C/C++ is more readable, half the coding, you can make windows apps with it (of course ), and you can program games with it (via pygame). I just love it, I''ve learned twice as much with Python as I did in half the time I learned HALF as much I know about Python as I do C++. It''s just so practical. Instead of - #include <iostream> int main() { cout<<"Hello world!"< Of course that''''s just my opinion, I could be wrong. -)(-Dennis Miller-)(-
_________________Politics is the ability to foretell what is going to happen tomorrow, next week, next month and next year. And to have the ability afterwards to explain why it didn't happen. -- Winston ChurchillGDNet-0.2 - rate users the easy way with this nifty Firefox extension. Updated with new features.
Currently it''s just very slow. Often it''s not an issue though (if it''s used to code parts where very little time is spent)

Also, I think you should''ve given an example where Python is actually good, not pretty much equal to C++..
Advertisement
quote: Original post by Drevay
print "Hello Wrold!"


Does it correct spelling too ?

quote: Original post by Leffe
Does it correct spelling too ?
Heh, actually spelling errors can lead to subtle bugs in Python so one had better not make any typos. Since variables aren''t introduced like in C/C++, if you mistype a variable name it will create a new variable with that name.

somevariable = 5

...

somavaribale = 0

... #here something unexpected will happen, since somevariable wasn''t set to 0..
I don''t have much expierience with python, but it sounds cool... can you use opengl?

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
yes, python is a very intresting wee scripting lang.
I''m intrested in it from an intergation with C++ stand point, mostly after seeing it used with such great effect with Eve: the Second Gensis ( www.eve-online.com )
Advertisement
I''d expect that opengl could be used with python.

Currently, the main thing which intrigues me about c++ is that an auto object''s destructor is called as soon as it goes out of scope. In a language such as c, your code might read as: "open file, read file, close file." - the c++ equivalent would read "open file (and close it later), read file." Does python have this, or equivalent functionality?

As for this "print" business...
  #include <iostream>using namespace std;#define print oh_teh_nos,struct oh_teh_nos_t {} oh_teh_nos;template <class RHS>const oh_teh_nos_t& operator , (const oh_teh_nos_t& lhs, RHS rhs){  cout << rhs;  return lhs;}int main(){  print "pie pie ", 42, " something.\n"; // now shut up!}  
Python and OpenGL: http://pyopengl.sourceforge.net/


"If there is a God, he is a malign thug."
-- Mark Twain
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
yes pyopengl works just fine
Thanks... python is cool!

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-

This topic is closed to new replies.

Advertisement