Is the practice of TDD fundamentally, if not philosophically, somewhat
contrary to Python's EAFP approach?
TDD = Test-Driven Development
EAFP = it's easier to ask forgiveness than permission
* WebRefs as footnote
The practice of TDD* is that one writes test routines to prove a unit of
code,
On 2019-11-01 03:47, originallmo...@gmail.com wrote:
It's been years since I've done anything with Python, and it wasn't a language
I was terribly familiar with even then. I'm using Python 3.8 on my Windows 7
laptop. Python itself works so far as I can tell. I can get it to import pip
without
Cameron Simpson於 2019年11月1日星期五 UTC+8下午12時13分45秒寫道:
> On 31Oct2019 20:44, Jach Fong wrote:
> >The script test.py is something like this:
> >---test.py
> >from pyeds import fsm
> >...
> >...
> >class Rule_Parse:
> >def __init__(self):
> >...
> >self.current_char = ''
> >...
>
On 31Oct2019 20:44, Jach Fong wrote:
The script test.py is something like this:
---test.py
from pyeds import fsm
...
...
class Rule_Parse:
def __init__(self):
...
self.current_char = ''
...
...
def main(input_str):
for c in input_str:
...
rule.current_char =
It's been years since I've done anything with Python, and it wasn't a language
I was terribly familiar with even then. I'm using Python 3.8 on my Windows 7
laptop. Python itself works so far as I can tell. I can get it to import pip
without problems, but, when I try to get going with pygame, I h
The script test.py is something like this:
---test.py
from pyeds import fsm
...
...
class Rule_Parse:
def __init__(self):
...
self.current_char = ''
...
...
def main(input_str):
for c in input_str:
...
rule.current_char = c
...
if __name__ == '__
On 10/30/19, Arnaud Loonstra wrote:
>
> I have a binding to access and create the C methods and structures so in
> Python I can call the Zmsg() constructor. I now need to return this.
>
> My python test method is simply:
>
> def actor_test( *args, **kwargs):
> print("test")
> msg = Zmsg(
In comp.lang.python, Paul Rubin wrote:
> Dan Stromberg writes:
>> By an Artifact Repository, I mean something that can version largish
>> binaries that are mostly produced by a build process.
> I'm not familiar with the term "artifact repository" and hadn't heard of
> the ones you mentioned, but
Den 2019-10-16 skrev Piet van Oostrum :
> Martin Schöön writes:
>
>> Den 2019-10-15 skrev Piet van Oostrum :
>>>
>> pip is version 8.1.1 which is what Ubuntu 16.04 comes
>> with. I have learnt -- the hard way -- that pip should be
>> used with the --user option. Does this mean I am stuck with
>>
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 41.8.
print('Enter the total cost of the meal')
Tot
On Fri, Nov 1, 2019 at 7:51 AM ferzan saglam wrote:
>
> The code below which I have written should print the result of 43.6 with the
> given values I have included at the end of this question, but for some odd
> reason I get the result of 44.44.
>
You're posting multiple threads with the same q
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 41.8.
print('Enter the total cost of the meal')
Tot
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
print('Enter the total cost of the meal')
Tot
On 2019-10-31 18:46, ferzan saglam wrote:
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter the total cost of the meal: \n"))
On 10/31/19 11:46 AM, ferzan...@gmail.com wrote:
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter the total cost of the meal: \n"))
How are you getting any value at all? You are trying to do math on string
values just like in your infinite loop question.
This should raise
TypeError: unsupported operand type(s) for /: 'str' and 'str'
Also, tips are usually given as percentages. Here with a tip value of 9 you're
saying that th
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter the total cost of the meal: \n"))
Dan Stromberg :
> Can anyone please recommend an opensource "Artifact Repository" suitable
> for use with CPython, including dozens of wheels, tar.gz's and .py's?
>
> By an Artifact Repository, I mean something that can version largish
> binaries that are mostly produced by a build process.
>
> It
Hi folks.
Can anyone please recommend an opensource "Artifact Repository" suitable
for use with CPython, including dozens of wheels, tar.gz's and .py's?
By an Artifact Repository, I mean something that can version largish
binaries that are mostly produced by a build process.
It doesn't necessari
On 31/10/2019 00:17, Larry Hastings wrote:
>
>
> Due to awkward CDN caching, some users who downloaded the source code
> tarballs of Python 3.5.8 got a preliminary version instead of the
> final version. As best as we can tell, this only affects the .xz
> release; there are no known instances of u
Hello,
Recently I have been trying to use a reantrant read write lock in my
project but discovered several problems when writing test cases.
All the relevant material can be found on the following locations
https://stackoverflow.com/questions/58410610/calling-condition-wait-inside-thread-causes-r
On 31-10-2019 14:44, Thomas Jollans wrote:
On 31/10/2019 14.13, Arnaud Loonstra wrote:
On 30-10-2019 09:32, Arnaud Loonstra wrote:
Hi all,
I'm trying to wrap my head around the ctypes API. I have a C
structure I wish to create in Python and then return from python to C.
So a python method is
On 31/10/2019 14.13, Arnaud Loonstra wrote:
> On 30-10-2019 09:32, Arnaud Loonstra wrote:
>> Hi all,
>>
>> I'm trying to wrap my head around the ctypes API. I have a C
>> structure I wish to create in Python and then return from python to C.
>>
>> So a python method is called from C and needs to re
On 30-10-2019 09:32, Arnaud Loonstra wrote:
Hi all,
I'm trying to wrap my head around the ctypes API. I have a C structure I
wish to create in Python and then return from python to C.
So a python method is called from C and needs to return an object which
we then process in C again.
I have
Hello,
I have been encountering problems with installing packages on python. I am
using windows 10, pycharm and pip install order in command prompt to
install packages.At first I had an error with installing numpy (something
with visual c++ so i downloaded them and it worked).Now i want to download
Dear developers,
I have stuck upon a problem with all of my attempts to import libraries to
Python. PyCharm and Anaconda both fail, as well as terminal. Find the
screenshots enclosed. I have tried reinstalling both several times, of no
help. All of the libraries I tried to import are already downl
26 matches
Mail list logo