<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/res/preview.xsl"?>
<rss version="2.0">
  <channel>
    <title>Stackoverflow - interesting python questions with answer</title>
    <link>http://stackoverflow.com/search?tab=newest&amp;q=[python]&#37;20hasaccepted&#37;3a1&#37;20votes&#37;3a5&#37;20closed&#37;3a0</link>
    <description><![CDATA[Stackoverflow - interesting python questions with answer]]></description>
    <lastBuildDate>Mon, 21 May 2012 07:34:00 GMT</lastBuildDate>
    <generator>Feed43 Proxy/1.0 (www.feed43.com)</generator>
    <ttl>360</ttl>

<item>
<guid isPermaLink="false">3784c770fc6514848b7799ded69f6aab</guid>
<title>Why does using None fix Python's mutable default argument issue?</title>
<link>http://stackoverflow.com/questions/10676729/why-does-using-none-fix-pythons-mutable-default-argument-issue</link>
<description><![CDATA[I'm at the point in learning Python where I'm dealing with the Mutable Default Argument problem. def bad_append(new_item, a_list=[]): a_list.append(new_item) return a_list def good_append(n &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">f44b7c3f0166e51416ff0186d4a5ae01</guid>
<title>Count all elements in list of arbitrary nested list without recursion</title>
<link>http://stackoverflow.com/questions/10584873/count-all-elements-in-list-of-arbitrary-nested-list-without-recursion</link>
<description><![CDATA[I have just learned about recursion in Python and have completed assignments, one of which was to count all the elements within a list of arbitrarily nested lists. I have searched this site and the an &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">f5adb8f948e00126f45e0548803e2375</guid>
<title>str performance in python</title>
<link>http://stackoverflow.com/questions/10530315/str-performance-in-python</link>
<description><![CDATA[While profiling a piece of python code (python 2.6 up to 3.2), I discovered that the str method to convert an object (in my case an integer) to a string is almost an order of magnitude slower than usi &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">a3fa6d4346e3a36c1385e972c33b6af7</guid>
<title>Why does “[] == False” evaluate to False when “if not []” succeeds?</title>
<link>http://stackoverflow.com/questions/10440792/why-does-false-evaluate-to-false-when-if-not-succeeds</link>
<description><![CDATA[I'm asking this because I know that the pythonic way to check whether a list is empty or not is the following: my_list = [] if not my_list: print "computer says no" else: # my_list isn't emp &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">d7dcb5011baae62e0520fc0d16572f51</guid>
<title>Solving Puzzle in Python</title>
<link>http://stackoverflow.com/questions/10388060/solving-puzzle-in-python</link>
<description><![CDATA[I got one puzzle and i want to solve it using Python. Puzzle: A merchant has a 40 kg weight which he used in his shop. Once, it fell from his hands and was broken into 4 pieces. But surpris &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">255f6b3e6d931fe1a4986df01d4406d1</guid>
<title>String immutability in CPython violated</title>
<link>http://stackoverflow.com/questions/10378083/string-immutability-in-cpython-violated</link>
<description><![CDATA[This is more of an 'interesting' phenomena I encountered in a Python module that I'm trying to understand, rather than a request for help (though a solution would also be useful). &gt;&gt;&gt; import &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">1726c1b4727f53dcd58f53212ca8885c</guid>
<title>Emit reStructuredText from sphinx autodoc?</title>
<link>http://stackoverflow.com/questions/10377576/emit-restructuredtext-from-sphinx-autodoc</link>
<description><![CDATA[CPython doesn't use autodoc for its documentation - we use hand-written prose. For PEP 3144 (the ipaddress module), I'd like to use sphinx-apidoc to generate the initial reference documentation. That &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">c7a81ae41798f2bd36e2c124406e0379</guid>
<title>Python faster than compiled Haskell?</title>
<link>http://stackoverflow.com/questions/10357663/python-faster-than-compiled-haskell</link>
<description><![CDATA[Please feel free to mark this as irrelevant if you think it doesn't belong here. I have a simple script written in both Python and Haskell. It reads a file with 1,000,000 newline separated integers, &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">8459a1ab07bf1e3be8460dfa6d3bb0c4</guid>
<title>Difference between the built-in pow() and math.pow() for floats, in Python?</title>
<link>http://stackoverflow.com/questions/10282674/difference-between-the-built-in-pow-and-math-pow-for-floats-in-python</link>
<description><![CDATA[Is there a difference in the results returned by Python's built-in pow(x, y) (no third argument) and the values returned by math.pow(), in the case of two float arguments. I am asking this question b &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">73129372ef775dd93e28deea616eeda1</guid>
<title>Parsing large (20GB) text file with python - reading in 2 lines as 1</title>
<link>http://stackoverflow.com/questions/10220862/parsing-large-20gb-text-file-with-python-reading-in-2-lines-as-1</link>
<description><![CDATA[I'm parsing a 20Gb file and outputting lines that meet a certain condition to another file, however occasionally python will read in 2 lines at once and concatenate them. inputFileHandle = open(input &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">bee8236cb773503116c80cc68602d980</guid>
<title>why does python `any` return a bool instead of the value</title>
<link>http://stackoverflow.com/questions/10180344/why-does-python-any-return-a-bool-instead-of-the-value</link>
<description><![CDATA[and and or return the last element they evaluated, but why doesn't Python's built-in function any? I mean it's pretty easy to implement oneself like this, but I'm still left wondering why. def any(l &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">3f602ca6199f55fb37e2df9ae0cadc90</guid>
<title>How do you count cardinality of very large datasets efficiently in Python?</title>
<link>http://stackoverflow.com/questions/10164608/how-do-you-count-cardinality-of-very-large-datasets-efficiently-in-python</link>
<description><![CDATA[I have been playing at work with some very very large sets of data, typically several billions of elements, that are all maintained in a memcached cloud and periodically dumped into files, and for one &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">8b3ef3832fc6d04048bfee8101ac382f</guid>
<title>Python: Why do int.numerator and int.denominator exist?</title>
<link>http://stackoverflow.com/questions/10156777/python-why-do-int-numerator-and-int-denominator-exist</link>
<description><![CDATA[int.numerator and int.denominator are a mystery to me. help(int.numerator) states: the numerator of a rational number in lowest terms But as far as I know, int is not a rational number. So why &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">ead56709445fd07d9d58a188cc35879f</guid>
<title>Rolling out a web authentication system</title>
<link>http://stackoverflow.com/questions/10095987/rolling-out-a-web-authentication-system</link>
<description><![CDATA[I'm building a site that requires user authentication and authorization. My initial idea was to write the application using the Flask framework. However, I learned that Flask doesn't have a built in a &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>
<item>
<guid isPermaLink="false">4cdebbc8ba4a371646cc7bc3984d1058</guid>
<title>Is there a Python equivalent of range(n) for multidimensional ranges?</title>
<link>http://stackoverflow.com/questions/10093293/is-there-a-python-equivalent-of-rangen-for-multidimensional-ranges</link>
<description><![CDATA[On Python, range(3) will return [0,1,2]. Is there an equivalent for multidimensional ranges? range((3,2)) # [(0,0),(0,1),(1,0),(1,1),(2,0),(2,1)] So, for example, looping though the tiles of a rect &hellip;<p><sub><i>-- Delivered by <a href="http://feed43.com/">Feed43</a> service</i></sub></p>
]]></description>
</item>


  </channel>
</rss>

