python-3.x
Is there a Python module where I could easily convert mixed fractions into a float?
I\'m just wondering if I could easily convert a mixed number (entered as a number or a string) into a floating point number or an integer. I\'ve looked at the fractions module but it seems like it cou[详细]
2023-04-03 20:46 分类:问答how to streamline (or parallelize with multiprocessing) some python 3.2 code with many loops?
I tried to educate myself about optimizing python and potentially parallelizing my problem. The links I used are listed at my question posted over at http://www.python-forum.org/pythonforum/viewtopic.[详细]
2023-04-03 19:37 分类:问答Since when does the bytes() function exist in Python?
Since which version does the b开发者_运维百科ytes() function exist in Python? I\'m writing some code that has to be compatible with as much versions of python as possible, so this kind of information[详细]
2023-04-03 03:48 分类:问答Tail recursive function fails to return a value (Python 3)
I\'ve created a tail recursive function to solve an optimization problem: def optimize(current_price = 0.1, last_profit = 0.0):[详细]
2023-04-03 03:41 分类:问答Pygame - Compiling to exe with Cx_Freeze
I\'m trying to convert my pygame game to exe with Cx_freeze; It works fine when I run it from a script, but when I run it as an exe, it crashes with a:[详细]
2023-04-02 07:36 分类:问答Python 3.x WSGI Testing framework
Given that webtest doesn\'t seem to have a 3.x version (or any plans to develop one), are there any solutions for automated system testing of a WSGI application? I know unittest for unit testing - I\'[详细]
2023-04-02 04:53 分类:问答Check sum in list comprehension
Is it possible to also check the sum of the digits in the list in the same comprehension a开发者_StackOverflownd make another except if the sum exceeds 50?[详细]
2023-04-02 04:31 分类:问答Matching everything but words, numbers and spaces
This code will replace everything except for words, but how do I get it to also leave the numbers and spaces untouched? e.g. \"I didn\'t see him u开发者_JAVA百科ntil 1.\" -> \"I didnt see him until 1\[详细]
2023-04-02 03:23 分类:问答How do I get a reference for the current class object?
In Python, how do I get a reference to the current class object within a class statement?Example: def setup_class_members(cls, prefix):[详细]
2023-04-02 01:56 分类:问答Size of list in memory
I just experimented with the size of python data structures in memory. I wrote the following snippet:[详细]
2023-04-01 20:07 分类:问答
加载中,请稍侯......