All Questions
Tagged with python programming-languages
56
questions
1
vote
4answers
352 views
Do all dynamically typed languages not support function overloading?
I have noticed that JavaScript and PHP and Python do not support function overloading.
Do all dynamically typed languages not support function overloading? If the answer is yes, then why is that?
27
votes
6answers
8k views
What does it mean when you say C++ offers more control compared to languages like Python?
I am comparing C++ with Python. It is clear that C++ is much more efficient and that the C++ code compiles directly to machine code whereas in Python it is interpreted.
I do understand that Python is ...
-3
votes
3answers
266 views
is python(cpython) code represented as c code by the interpreter?
what i know is , in cpython when we run a code then its first compiled into byte code and the cpython interpreter( which is written in c interprets it) interprets the byte code and converts it into ...
2
votes
1answer
822 views
Custom language with mixed markup and Python, parsing in Python
I need a system for creating Python subclasses in a simple manner, and I was thinking of using a (custom) config language similar to json, xml, etc.
Here's the initial structure I thought of (one ...
5
votes
1answer
244 views
In more canonical OO Python situations, what is the rule of thumb for default access modifiers?
Generally speaking in canonical OOP situations, the rule of thumb is to write your classes with the least access as necessary. i.e. only make public only what is necessary, make protected only what is ...
-2
votes
1answer
80 views
Python Syntax Format
Since I am new to programming, I just want to understand the format the built-in functions is represented in the documentations. This is the one from python
bytearray ([source[, encoding[,errors]]])...
4
votes
2answers
99 views
Is there any good/fundamental reason that Python classvars, and JavaScript prototype inheritance, don't mutate the parent on assignment?
In Python, if you have a classvar, it's accessible from an instance, but if you set the variable on the instance it doesn't actually change the classvar, rather it assigns a new name which shadows the ...
0
votes
3answers
1k views
Definition of Generic function
1)
Below is a python function summation, that can perform sum of cubes/squares/.., similar operations.
def identity(k):
return k
def cube(k):
return pow(k, 3)
def square(k):
return ...
1
vote
4answers
234 views
Why does string.find(“”) = 0? [closed]
I'm studying Python and hung up on a simple problem. Let's say we have:
string = "hello"
When we invoke the find method on the string to find an empty string like this:
string.find("")
Why does ...
-1
votes
1answer
163 views
Why do we use 'assert not' in this example?
My code takes 2 dates and finds the age of those dates in days. In my daysBetweenDates method the instructor uses an assert statement:
assert not dateIsBefore(year2, month2, day2, year1, month1, day1)...
3
votes
2answers
2k views
What makes a scientific programming language, scientific?
Why are some programming languages such as Python or Julia considered to be "scientific" programming languages? I guess my real question what is the criteria that makes a programming language ...
0
votes
4answers
2k views
Why use a higher level language? [closed]
A question that gets asked a lot is "Why use low level languages if you can code in high level languages more easily (and often tersely)?". I think the answers are fairly straight forward here, being ...
8
votes
2answers
5k views
How are scripting languages compiled?
I know the term "scripting languages" is just a subset of programming languages, but I want to refer to programming languages such as Python and Ruby among others.
First of all, why don't we need a ...
-1
votes
2answers
511 views
How are complex programs made? [duplicate]
I know a few languages, and can program in them. How do multiple languages blend together in a single program? For ex. https://github.com/facebook/watchman. This uses C, PHP, Python, Javascript, etc. ...
-1
votes
1answer
529 views
execute selection in console in C++ like python or R language [closed]
I am started to learn C++ using as IDLE Clion of jetbrain company. Normally using the IDLE of Python (i.e., Pycharm of Jetbrain) or R project i am able to execute selection in console line-by-line my ...
10
votes
4answers
1k views
Why do python generators and functions share the “def” keyword?
Consider the following:
def some_function():
return 1
def some_generator():
yield 1
In the code above, some_function is a function, while some_generator is a generator. They look quite ...
8
votes
4answers
9k views
How does Python compile some its code in C?
I read that some constructs of Python are more efficient because they are compiled in C.
https://wiki.python.org/moin/PythonSpeed/PerformanceTips
Some of the examples used were map() and filter(). I ...
1
vote
2answers
862 views
Can a version of Python's shelve module that knows when its entries have been modified be written in any programming language?
shelve is a Python module that makes it easy to persist a Python dictionary to disk (under the right conditions).
The documentation for shelve gives this example to demonstrate one of the pitfalls of ...
1
vote
1answer
307 views
Pythonic version of Java interfaces
I fully acknowledge that Python and Java are different programming languages and should be used differently. That said, "Program to an interface, not to an implementation" is good language-agnostic ...
2
votes
3answers
649 views
Is Python suitable for a statistical modeling application looking over thousands of past events?
I'm currently working on a project with a partner where we analyze large datasets of past sporting events. There are approximately 30,000 events per year and we have historical data for five years. ...
4
votes
1answer
601 views
Will loop constructs become obsolete? [closed]
By loop constructs I mean for… and while… constructs with nested statements.
Currently I am coding a tool in Python and decided out of curiosity not to use the regular loops - and rely on filter/map/...
4
votes
1answer
4k views
Tips for Tail Call Recursion in Python [duplicate]
Ok, Python doesn't have tail call optimization.
But for those who think better recursively than "looply", whats the best practices to write code??
1000 stack calls are enough for many cases, but ...
6
votes
3answers
543 views
From an execution perspective is an interpreter the same as the JVM / or the .net Framework
I've recently started two introductory level courses - one using Python, the other Java.
I've read the answers to this Question but still have difficulty understanding how each ends up with machine ...
3
votes
1answer
732 views
Objects of different programming languages [closed]
Apparently, there are some resemblance between objects in JavaScript and dictionaries in Python. Each language defines an object a little different (and there is some logic that all definitions to be ...
3
votes
1answer
1k views
Is Python Cookbook for python 2.4 applicable to python 2.7.5?
My college has a course on Introduction to programming using python and we are using Python 2.7.5.
I would like to know if it will be helpful to read Python Cookbook which is for python 2.4?
There ...
11
votes
3answers
1k views
Do I need to understand the Internals of a programming language?
I am beginner to Python and I really like it so far.
One question that comes to my mind very often is if I need to understand and therefore learn the Internals of a programming language (as in my case ...
1
vote
2answers
702 views
How can I work on multiple programming languages at same time [duplicate]
It always happen to me that if I leave the stuff for 1-2 months I forget the stuff.
5 months back I had symfony project and I did that. At that time I was very much confident that I can do any ...
-1
votes
2answers
323 views
Starting Development with Python [closed]
I'm currently a beginning developer (3 years). I have been mainly doing Web Development for as long as I have been developing. This is my comfort zone when it comes to programming.
I like both ...
6
votes
5answers
2k views
Spoiled by Python convenience- and productivity-wise, spoiled by C++ speed-wise. Now unhappy with both [closed]
I'm currenetly struggling with choosing how to proceed as a programmer. I mainly programmed games and would like to continue. And for about 5 years or so I just used C++ and OpenGL, so I spent a lot ...
5
votes
2answers
2k views
Alternative Scripting Language to Lua? [closed]
I would like to add scripting support to an applications and with plenty scripting languages available I am a bit overwhelmed.
At first I thought about Python but I guess Python is a little too big ...
3
votes
2answers
447 views
How to fix bad fundamentals? [closed]
I am a native PHP developer, and have been for about a year or so. I love PHP and it was very easy for me to learn, but I have developed some bad habits along the way due to never having a formal ...
2
votes
3answers
2k views
How did Python become popular as a scripting language? [closed]
I looked at it in my field of work, which is film and pretty much every software we use comes with python as a scripting language: http://en.wikipedia.org/wiki/List_of_Python_software That made me ...
40
votes
4answers
32k views
Difference between a REPL and interactive shell
Noob question. I am not quite able to tell the difference between a REPL and an interactive shell just by reading the definitions on Wikipedia.
Wiki notes that REPL is a particular kind of ...
34
votes
5answers
120k views
Why doesn't Python need a compiler?
Just wondering (now that I've started with C++ which needs a compiler) why Python doesn't need a compiler?
I just enter the code, save it as an exec, and run it. In C++ I have to make builds and all ...
12
votes
6answers
18k views
What are some characteristics of Python that makes it unique as its own language? [closed]
What are some characteristics of Python that makes it unique as its own language? I'm looking for any sort of characteristics ranging from good to bad, useful to hindrance, syntax to real-world usage, ...
3
votes
3answers
271 views
Use the latest technology or use a mature technology as a developer?
I would like to develop an application for a group of people to use. I have decided to develop using python, but I am thinking of using python 2.X or python 3.X. If I use python 2.X, I need to upgrade ...
5
votes
5answers
2k views
increasing productivity - mastering a language vs. selecting efficient tools
I'm looking for advice from experienced developers on this question.
In my work there's a need for a lot of one-off code. It's tempting to just dip into the right python/perl library calls to do ...
3
votes
2answers
558 views
Using a microframework, or rolling your own
I really like a microframework in Python called Flask. I have used it for the past 2 months, and I find it excellent. Now, I would like to use it in deployment, but, there are a few things I'm afraid ...
12
votes
7answers
18k views
Is Python a good choice to develop UIs? If so, wxPython or Tkinter?
I'm looking forward to develop a desktop application using Python. I'm a beginner and I don't have sufficient expertise in Python. I'm also a Java programmer. Although I have some experience in ...
6
votes
1answer
5k views
Python programming patterns and practices? [closed]
What are the best python programming patterns and practices you are using every day?
I don't mean only design patterns (there are lot of OO design patterns that can be used in python), I mean pure ...
6
votes
5answers
11k views
What skills are needed for machine learning jobs? [closed]
I posted this question on Quora, but didn't get enough responses. reposting it here.
I am a learner sitting at home and learning linear algebra, very interested on working in Machine Learning ...
9
votes
4answers
405 views
What to cover in a “introduction to python” talk?
I'm in a student team that is focusing on web development. My teammates are interested in Python and I'm the only one that has learned it, so I was asked to give an "introduction to Python" talk next ...
8
votes
6answers
12k views
What language to use for prototyping and creating quick scripts? [closed]
Right now, I use Python for my quick scripts and prototypes (e.g. algorithms, my pseudocode is very Python-like as well). The oher languages that I am familiar with include Java, C, x86 Assembly and ...
28
votes
5answers
17k views
Is programming in Python faster than in C, C++ or Java? [closed]
There's a widespread belief among programmers that the more dynamic and loosely typed the language, the more productive the programmer will be in it. Guido van Rossum wrote about programming ...
10
votes
10answers
9k views
Do Python programmers find the whitespace issue inconvenient? [closed]
Many programmers, upon first encountering Python, are immediately put off by the significance of whitespace. I've heard a variety of reasons that this is inconvenient, but I've never heard a complaint ...
229
votes
9answers
75k views
Why do people hesitate to use Python 3?
Python 3 was released in December 2008. A lot of time has passed since then but still today many developers hesitate to use Python 3. Even popular frameworks like Django are not compatible with Python ...
26
votes
7answers
14k views
Python productivity VS Java Productivity
Over on SO I came across a question regarding which platform, Java or Python is best for developing on Google AppEngine. Many people were boasting of the increased productivity gained from using ...
22
votes
11answers
7k views
If we can do functional programming with Python, do we need a specific functional programming language? [closed]
Using generators and lambda, we can do functional programming with Python. You can also achieve the same thing with Ruby.
So the question is: why do we need specific functional programming languages ...
2
votes
4answers
2k views
Python vs. Java for embedded wireless module [closed]
We are developing a product at work which interfaces with basic I/O and sends data to a webserver over a GPRS connection.
What i need to know before we commit to a product, is which language is more ...
30
votes
6answers
27k views
Programming language usage at Google [closed]
I have heard Google uses Python, Java and C++. But what I don't know is how is each of those programming language is used. I mean what is Python, Java and C++ is used for at Google. Why would they ...