What is your favorite feature of Python? [duplicate]
What is a feature you could not live without when using Python?
If you don't mind bold face it at the top :) and the give a short explanation why you can't live without it or a short example of what it can do. If you see it already on the list, up vote that person and then add your reason in a comment.
- short and concise
- easy to read
They can be used as generators:
for something in (x for x in xrange(huge_number)):
They can also be nested which can replace a huge amount of nested for loops:
[(i, j) for i in range(10) for j in range(10)]
List comprehensions are a pretty powerful construct. Some basic info on them can be found here.
Duplicate: Cross-platform gui toolkit for deploying Python applications I want to create a GUI application in python. Which library is best one ?
What is your favorite bug/issue tracking system? And why? (Please answer this question only if you have used at least three different bug tracking systems for quite a long time. And please mention the
Possible Duplicate: Python variable declaration i'm new to python, and i wonder how to put a proper empty variables into classes. For example, in C++, I can put variables like: public class employ
Let's take this xml structure as example: <?xml version=1.0 encoding=utf-8?> <Configuration-content> <XFile Name=file name 1 /> <XFile Name=name2 /> <XFile Name=nam
What's the point of the Sign Off feature in Git? git commit --signoff When should I use it, if at all?
If you had to choose your Favorite (clever) techniques for defensive coding, what would they be? Although my current languages are Java and Objective-C (with a background in C++), feel free to answer
Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument Edit: This has nothing to do with recusion and is merely the mutable default argument feature: Least Astonishment i
what are your favorite PHP programming trick(s)? I myself like Resession (Session Manager)
What's your prefered method to name your software releases? Like Microsoft: alpha - beta - final - service pack... Like Google: gmail beta - beta - beta - beta - :) Like some softwares: 0.2 - 0.3 - 0.
Its not uncommon that I have a program whose performance relies heavily on just a few functions and I want to be able to measure a single loop or code segment's speed down to single-clock precision so
If you release an app that uses an api that is later deprecated (after the release of your app), then what happens ? What if you never update your app after it is released on the store ? Will it work
>>> a = False >>> b = False >>> a | b True >>> a True >>> b True I get this in a python interpreter, I just don't think so. Is there any detailed material
Possible Duplicate: Python tutorial for total beginners? Hi I am new in the forum and would like to have advices concerning books to learn Python. Thanks in advance. Mamane
There are printfs, asserts, edit and continue, logging frameworks? Whats your favorite poison?
This question already has an answer here: Can I not catch a specific or custom exception? 5 answers What is the best way to exclude an exception type from your catch? You may not know what type
Possible Duplicate: What’s the best SOAP library for Python 3.x? I couldn't find one that works with Python 3.1. Any suggestions for a WSDL-consuming Python 3 SOAP client module/library?
many social networks let to invite your gmail-hotmail-yahoo friends (even Outlook, but I thinks that is more difficult) to the social network. Basically the app read your email friends list and sent a
Possible Duplicate: What IDE to use for Python? I really don't like the python gui, so im looking for an IDE to use. Open source.
I've been giving a talk recently on a plethora of Open Source (some are borderline open-source, I'll admit) debugging tools and the audiences have been making great additions to my list. I'd like to g
Possible Duplicate: Efficiency of Java “Double Brace Initialization”? What is Double Brace initialization in Java? I found the code below as a Java hidden feature (in Portuguese). The guy explains t
Possible Duplicate: Special (magic) methods in Python who can tell me what can call the built-in functions in next code I have being using python and every now and then I discover an implicit class
This question already has an answer here: Explain Python's slice notation 19 answers Please explain me what does this piece of code do. h should be 32Byte result from sha256 calculation. I am r
This question already has an answer here: Why can't decimal numbers be represented exactly in binary? 20 answers We know that python float number is 64bit. And I take a test: float(2**53) is 90
I have not used Unit Testing so far, and I intend to adopt this procedure. I was impressed by TDD and certainly want to give it a try - I'm almost sure it's the way to go. Boost looks like a good choi
I'm building a Narrow your results by feature similar to Best Buy's and NewEgg's. What is the best practice for storing the user's filter selections in a URL that can be shared/bookmarked? The obvi
Is there any way in Python to determine what exceptions a (built-in) function might raise? For example, the documentation (http://docs.python.org/lib/built-in-funcs.html) for the built-in int(s) says
I have a module that is specifically Python 3. What's the best way to ensure that if someone tries importing it in Python 2 that it blows up/raises some sort of exception? Right now I have: # all my i
Possible Duplicate: Understanding Python decorators I am quite new on using Python decorators and from what I understand on my first impression that they are just syntactic sugar. Is there a more pr
This question already has an answer here: What does [:] in Python mean 6 answers e.g. if tableState is a tuple, and we're declaring a variable: x = tableState[:] What would the [:] mean?
Possible Duplicate: Python: single instance of program What is the best way to insure that only 1 copy of a python script is running? I am having trouble with python zombies. I tired creating a writ
This question already has an answer here: What does asterisk * mean in Python? [duplicate] 5 answers What is the role of * inside of a print function in Python? print (Hello World!\n) print
Stack Overflow has covered favorite short-cuts and add-ins, optimizations and preferences -- great topics all. If this one has been covered, I can't find it -- so thanks in advance for the link. What
Besides just the CDT what do you find essential for c development using eclipse?
What diagramming technique(s) do you use while programming to help you or others understand your program or design. I am not talking about a person's favorite tool, though a good tool probable helps a
Possible Duplicate: What's your favorite profiling tool (for C++) Are there any good tools to profile a source code which is mix of of C and C++. What are the pros and cons of any, and which ones ha
what is your favorite database for supporting of spatial temporal issues ? sql server 2008 has data types for spatial temporal data. please post your experience with sql server 2008, oracle spatial, p
I think uri-templates are an extremely interesting feature for REST based applications. But appart from //put your favorite language here// based implementations I don't see any support for it in HTML
Possible Duplicate: Calling Java app with “subprocess” from Python and reading the Java app output Basically what I am looking for is, I want to interact with java program while its running using py
Possible Duplicate: What are your feelings on JavaFX? Hi folks, I'm learning Java at the moment, would say I'm at intermediate level at the moment. I came across JavaFX so checked out the website. W
Possible Duplicate: Python (and Python C API): new versus init I'm at college just now and the lecturer was using the terms constructors and initializers interchangeably. I'm pretty sure that this i
This is rather the inverse of What can you use Python generator functions for?: python generators, generator expressions, and the itertools module are some of my favorite features of python these days
What are the expert debugging hints for your favourite language, you think everyone should use? As an example, I'll provide my C++ debugging hints, that between them help me shake out most of the bugs
We programmers know our way around the computer better than just about anyone. And we love automation and shortcuts. What is your favorite time-saving trick, applicable to MS Windows.
Duplicate: What’s the best way to implement an ‘enum’ in Python? Whats the recognised way of doing enumerations in python? For example, at the moment I'm writing a game and want to be able to move
I recently started learning Python and I was rather surprised to find a 1000 deep recursion limit (by default). If you set it high enough, about 30000, it crashes with a segmentation fault just like C
Possible Duplicate: What does <if name==“main”:> do? Often, I see the following code in python programs if __name__ == '__main__': main() I'm following the Python Class on Google code, and it
Please respond with one by one. If you explain why it is not true then try to avoid general statements and provide particular examples.
These day I come up with a large software. I have to debug in Visual Studio 2008. The steps I take are: Using callstack window to find the code blocks that I i thinks it may have bugs. Using Immedia
Possible Duplicate: How can you profile a Python script? What visual tools do you know, something similar to JProfiler for Java, to analyze performance of Python applications?