On 11/09/2021 10:09, dn via Python-list wrote:
The stated requirement is: "I'd like to get the number of times I
tried". Given such: why bother with returning any of the pairs of values?
Indeed, if that's the requirement, then you can do even better, noting
that the probability of getting a
On 08/01/2021 18:21, Chris Angelico wrote:
On Sat, Jan 9, 2021 at 5:18 AM Andrew Jaffe wrote:
Hi,
I don't know if this makes more sense here or on "python-ideas" (or
elsewhere?) but I'll try this first:
I am starting to encounter more and more instances of packages req
Hi,
I don't know if this makes more sense here or on "python-ideas" (or
elsewhere?) but I'll try this first:
I am starting to encounter more and more instances of packages requiring
older, pinned, versions of modules, and this is occasionally actually
starting to cause conflicts.
It seems
Hi,
On 25/06/2020 12:50, Bischoop wrote:
I try to split input numbers, for example: 12 so I cant add them, I
tried separated split(' ') but it's not working.
Any ideas how to do this?
*
numb1,numb2=input("enter 1st and 2nd no ").split()
Avg=(int(numb1) + int(numb2)) / 2
print(Avg)
So, this i
Dear all,
\On 26/05/2020 15:56, BlindAnagram wrote:
I came across an issue that I am wondering whether I should report as an
issue. If I have a directory, say:
base='C:\\Documents'
and I use os.path.join() as follows:
join(base, '..\\..\\', 'build', '')
I obtain as expected from the d
On 06/03/2016 14:41, Steven D'Aprano wrote:
On Sun, 6 Mar 2016 10:34 pm, Tony van der Hoff wrote:
Hi, I've been experimenting with a short test program under python 2.7
and python 3.4.2. It's a simple read from file, and locate a word therein.
I get the (subjective) impression that python2 is
I use the python.org framework build of Python under recent versions of
OS X (i.e., 10.11 El Capitan). I need to build some extensions that rely
on recent versions of compilers (e.g., C++-11 features). However the
python.org python is built to work on older systems as well, for
backward compati
On 15/10/2014 23:50, ryguy7272 wrote:
The error that I get is this.
'invalid syntax'
The second single quote in this line is highlighted pink.
print 'Downloading data from Yahoo for %s sector' % sector
This is a script written for Python 2.*, but you say you are using
Python 3.4. In Python 3,
On 13/08/2014 14:46, Mok-Kong Shen wrote:
Am 13.08.2014 15:32, schrieb Steven D'Aprano:
Mok-Kong Shen wrote:
I like to compute log base 2 of a fairly large integer n but
with math.log(n,2) I got:
OverflowError: long int too large to convert to float.
Is there any feasible work-around for th
On 19/06/2014 08:02, Une BĂ©vue wrote:
On my mac i do have :
$ python --version
Python 2.7.2
I want to install Python 3 such as python-3.4.0-macosx10.6.dmg avoiding
disturbing the "built-in" version.
Is that possible ?
The python.org packages are explicitly created in order to have no
conflict
Steven Bethard wrote:
> Andrew Jaffe wrote:
>
> I'm not sure if I understand your goal here, but you can get different
> behavior using super().
>
> py> class sup(object):
> ... cvar1 = None
> ... cvar2 = None
> ... @classmet
Steve Holden wrote:
> Andrew Jaffe wrote:
>> Steve Holden wrote:
>>> Andrew Jaffe wrote:
>>>
>>>> The problem is that I actually do want to call these methods on the
>>>> class itself, before I've made any instances.
>>>>
&g
Steve Holden wrote:
> Andrew Jaffe wrote:
>
>>The problem is that I actually do want to call these methods on the
>>class itself, before I've made any instances.
>>
> Except you could use staticmethods with an explicit class argument ...
Steve,
Yep, that would
> Andrew Jaffe wrote:
>
>> Hi,
>>
>> I have a class with various class-level variables which are used to
>> store global state information for all instances of a class. These are
>> set by a classmethod as in the following
>>
>> class sup(ob
Hi,
I have a class with various class-level variables which are used to
store global state information for all instances of a class. These are
set by a classmethod as in the following (in reality the setcvar method
is more complicated than this!):
class sup(object):
cvar1 = None
cvar
15 matches
Mail list logo