I cannot seem to get pymongo to find my python installation – keep getting an
error saying pythin has not been found in the registry? Why is this.
Sent from Mail for Windows 10
--
https://mail.python.org/mailman/listinfo/python-list
Sent from my Sprint Samsung Galaxy S® 6.
--
https://mail.python.org/mailman/listinfo/python-list
I saw similar errors when using PyInstaller.
It has something to do with Windows 10 afaik.
2016-03-13 14:17 GMT+01:00 BobFtz--- via Python-list :
> Hello
>
> I have just downloaded and installed a copy of the 3.5.1 programme but when
> I come to run the programme I get an error message that say
I am having a lot of trouble getting python to find the pygame module; my
operating system is Windows 7. Can you offer any help? . Should I
download pygame into the same folder as Python? . any ideas at all?
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit
(Intel)
On Debian, the shared library, libpython3.4m.so, is ABI version tagged with an
“m.” I’m assuming that this is the ABI version tag specified in PEP 3149. The
PEP give an example of using sysconfig.get_config_var to get the name tag.
>>> sysconfig.get_config_var('SOABI')
'cpython-34m'
I’ve also n
We have more than 280 great proposals for talks and trainings ready
for EuroPython 2016 attendees to vote on.
Please note that you have to have a ticket for EuroPython 2016, or
have submitted a talk proposal yourself, in order to participate.
Attendees: This is your chance to
Am 13.03.2016 um 20:19 schrieb mrihustle12:
Sent from my Sprint Samsung Galaxy S® 6.
Not with this information, we'd need much more. The OS is necessary
information, but not sufficient.
Have you got Python installed? If yes, which version? Where did you get
it and how did you install it?
Den 13-03-2016 kl. 14:45 skrev kamaraju kusumanchi:
Is there a pdf version of the python tutorial
https://docs.python.org/3/tutorial/index.html that I can download? The
idea is to have everything in one file so I can search easily, be able
to work offline.
thanks
raju
Try here: https://docs.p
Hi Oscar,
that is weird. I am using Windows 10 and get exactly the same "warnings"
when I run PyInstaller.
But the update you mention is only available for up to Windows 8.1.
What about Windows 10 then??
Best,
Arie
2016-03-13 19:52 GMT+01:00 Oscar Benjamin :
> On 13 Mar 2016 17:06, "BobFtz-
On 14/03/2016 03:01, Steven D'Aprano wrote:
On Mon, 14 Mar 2016 12:16 am, BartC wrote:
Worth having but at significant cost. But look at my jpeg test (look at
any other similar programs); how many function names are used
dynamically? How many functions *really* need to be dynamic?
As difficu
On Mar 14, 2016 2:34 AM, "Tyson" wrote:
>
> I am having a lot of trouble getting python to find the pygame module; my
> operating system is Windows 7. Can you offer any help? . Should I
> download pygame into the same folder as Python? . any ideas at all?
In what form did you download PyGame?
On Thursday, March 10, 2016 at 7:22:26 PM UTC-6, Mark Lawrence wrote:
> Always a code smell when range() and len() are combined.
I would be careful about dealing in absolutes Mark.
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Mar 14, 2016 at 10:07 AM, Rick Johnson
wrote:
> On Thursday, March 10, 2016 at 7:22:26 PM UTC-6, Mark Lawrence wrote:
>> Always a code smell when range() and len() are combined.
>
> I would be careful about dealing in absolutes Mark.
I always think people should never use absolutes.
--
h
On Mon, 14 Mar 2016 07:07:45 -0700, Rick Johnson wrote:
> On Thursday, March 10, 2016 at 7:22:26 PM UTC-6, Mark Lawrence wrote:
>> Always a code smell when range() and len() are combined.
>
> I would be careful about dealing in absolutes Mark.
a code smell does not necesarily mean the code is wr
On Thursday, March 10, 2016 at 8:04:04 PM UTC-6, Mark Lawrence wrote:
> On 11/03/2016 01:45, BartC wrote:
> > [...]
> > Any other way of traversing two lists in parallel?
> >
>
> Use zip()
Sure, the zip function is quite handy, but it can produce
subtle bugs when both sequences are not of the same
On Sun, Mar 13, 2016 at 5:00 PM, Jeff Schumaker wrote:
> I'm trying to use Python Editor v5 for Chromebooks. It works fine, except it
> won't read data files. I'm just wondering if anyone else is using this editor
> and has found a solution to this problem.
Sorry, haven't tried it. On my Chrome
On 13/03/2016 09:39, Steven D'Aprano wrote:
On Sun, 13 Mar 2016 04:54 am, BartC wrote:
Common sense tells you it is unlikely.
Perhaps your common sense is different from other people's common sense. To
me, and many other Python programmers, it's common sense that being able to
replace functi
Hi,
I could solve the problem on Windows 10 this way:
- install Windows 10 stand alone sdk
https://dev.windows.com/en-us/downloads/windows-10-sdk
- add this dir to PATH: C:\Program Files (x86)\Windows
Kits\10\Redist\ucrt\DLLs\x86
HTH,
Arie
2016-03-14 13:07 GMT+01:00 Arie van Wingerden :
On 14 March 2016 at 12:07, Arie van Wingerden wrote:
> that is weird. I am using Windows 10 and get exactly the same "warnings"
> when I run PyInstaller.
> But the update you mention is only available for up to Windows 8.1.
>
> What about Windows 10 then??
I'm not sure what you mean. Windows 10 s
On 14 March 2016 at 14:35, Rick Johnson wrote:
>
> I would strongly warn anyone against using the zip function
> unless
...
> I meant to say: absolutely, one hundred percent *SURE*, that
> both sequences are of the same length, or, absolutely one
> hundred percent *SURE*, that dropping values is n
On Mon, Mar 14, 2016 at 9:06 AM, Oscar Benjamin
wrote:
> On 14 March 2016 at 14:35, Rick Johnson wrote:
>>
>> I would strongly warn anyone against using the zip function
>> unless
> ...
>> I meant to say: absolutely, one hundred percent *SURE*, that
>> both sequences are of the same length, or, a
Is this correct (today, with Daylight Savings in effect)?
>>> import pytz
>>> i.timezone
'America/Chicago'
>>> pytz.timezone(i.timezone)
>>> ot
datetime.datetime(2016, 3, 14, 9, 30, tzinfo=)
>>> ot.tzinfo
Shouldn't the America/Chicago timezone reflect DST?
Thx,
Skip
--
https://mail.python.or
On 10 March 2016 at 13:02, Peter Otten <__pete...@web.de> wrote:
> Heli wrote:
>
>> I need to loop over a numpy array and then do the following search. The
>> following is taking almost 60(s) for an array (npArray1 and npArray2 in
>> the example below) with around 300K values.
>>
>>
>> for id in np
On 14/03/2016 15:06, Oscar Benjamin wrote:
On 14 March 2016 at 14:35, Rick Johnson wrote:
I would strongly warn anyone against using the zip function
unless
...
I meant to say: absolutely, one hundred percent *SURE*, that
both sequences are of the same length, or, absolutely one
hundred perc
How did you install python?
On Mar 14, 2016 1:30 AM, "Ezra Simms" wrote:
> I cannot seem to get pymongo to find my python installation – keep getting
> an error saying pythin has not been found in the registry? Why is this.
>
> Sent from Mail for Windows 10
>
> --
> https://mail.python.org/mailma
On Monday, March 14, 2016 at 9:19:04 AM UTC-5, alister wrote:
> A code smell does not necessarily mean the code is wrong,
> just that it warrants investigation as there is a strong
> possibility it may be sub- optimal
Yes, technically speaking, you're correct.
But the concept of "code smell" has
On Mon, Mar 14, 2016 at 9:19 AM, Skip Montanaro
wrote:
> Is this correct (today, with Daylight Savings in effect)?
>
import pytz
i.timezone
> 'America/Chicago'
pytz.timezone(i.timezone)
>
ot
> datetime.datetime(2016, 3, 14, 9, 30, tzinfo= 'America/New_York' EDT-1 day, 20:00:00
On 13/03/2016 14:25, Irmen de Jong wrote:
On 12-3-2016 17:58, Imre De Craemer wrote:
hoe moet je python dounlauden
Dit is een Engelse newsgroup, dus je kunt je vragen beter in het Engels stellen
in
plaats van in het Nederlands. Maar om je vraag te beantwoorden:
Ga naar https://www.python.o
On Mon, Mar 14, 2016 at 10:26 AM, Ian Kelly wrote:
> Why should it? You only asked pytz for the Chicago timezone. You
> didn't ask for it relative to any specific time.
Thanks. I thought using America/Chicago was supposed to automagically
take into account transitions into and out of Daylight Sav
On 13/03/2016 13:20, Veek. M wrote:
Thomas 'PointedEars' Lahn wrote:
Nobility lies in action, not in name.
—Surak
Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad
to say I like/trust Ned a bit so *huggles* to you, and I shall snip.
Also, sorry about the 'Steve
On 2016-03-14 15:22, Rick Johnson wrote:
On Monday, March 14, 2016 at 9:19:04 AM UTC-5, alister wrote:
A code smell does not necessarily mean the code is wrong,
just that it warrants investigation as there is a strong
possibility it may be sub- optimal
Yes, technically speaking, you're correct
Ian Kelly wrote:
> On Mon, Mar 14, 2016 at 9:06 AM, Oscar Benjamin
> wrote:
>> On 14 March 2016 at 14:35, Rick Johnson
>> wrote:
>>>
>>> I would strongly warn anyone against using the zip function
>>> unless
>> ...
>>> I meant to say: absolutely, one hundred percent *SURE*, that
>>> both sequenc
On Monday, March 14, 2016 at 10:06:56 AM UTC-5, Oscar Benjamin wrote:
> On 14 March 2016 at 14:35, Rick Johnson wrote:
> >
> > I would strongly warn anyone against using the zip function
> > unless
> ...
> > I meant to say: absolutely, one hundred percent *SURE*, that
> > both sequences are of the
On Monday, March 14, 2016 at 10:17:54 AM UTC-5, Ian wrote:
> It's sometimes very useful [for zip to discard values],
> though.
The obvious solution is to allow the caller to decide if the
error should be raised, or not. Currently, the caller has no
control over the internals of zip unless he crea
On Mon, Mar 14, 2016 at 9:32 AM, Skip Montanaro
wrote:
> On Mon, Mar 14, 2016 at 10:26 AM, Ian Kelly wrote:
>> Why should it? You only asked pytz for the Chicago timezone. You
>> didn't ask for it relative to any specific time.
>
> Thanks. I thought using America/Chicago was supposed to automagic
On 14/03/2016 14:43, BartC wrote:
On 13/03/2016 09:39, Steven D'Aprano wrote:
On Sun, 13 Mar 2016 04:54 am, BartC wrote:
Common sense tells you it is unlikely.
Perhaps your common sense is different from other people's common
sense. To
me, and many other Python programmers, it's common sens
On Mon, Mar 14, 2016 at 11:20 AM, Ian Kelly wrote:
> Note that the above example is technically incorrect since
> datetime.now() returns local time and I'm not in the Chicago timezone,
> but it demonstrates the process.
>
> Also, if you haven't already read the pytz documentation, you should.
> ht
Hi Skip,
On 03/14/2016 09:32 AM, Skip Montanaro wrote:
> On Mon, Mar 14, 2016 at 10:26 AM, Ian Kelly wrote:
>> Why should it? You only asked pytz for the Chicago timezone. You
>> didn't ask for it relative to any specific time.
>
> Thanks. I thought using America/Chicago was supposed to automagi
Good morning!
I have been working with Python for the last few months. I have created a
script that I want to embed into a C++ environment, specifically CDT for
eclipse. I have read the https://docs.python.org/2/extending/index.html and
understand the ideas and differences between the two langu
On Monday, March 14, 2016 at 3:28:40 AM UTC-5, Tyson wrote:
> I am having a lot of trouble getting python to find the
> pygame module; my operating system is Windows 7. Can you
> offer any help? . Should I download pygame into the same
> folder as Python? . any ideas at all?
If you're new to Pyt
Hi Oscar,
no. By default W10 appears to have them NOT installed (at least that is
what I experienced).
You really need the SDK to be installed.
Also the path must point to the libs installed by the SDK.
Now it works without all those warnings.
Thx,
Arie
2016-03-14 15:59 GMT+01:00 Oscar Benjam
I've fixed the quoting below. Can you not top-post please Arie?
On 14 March 2016 at 16:59, Arie van Wingerden wrote:
> 2016-03-14 15:59 GMT+01:00 Oscar Benjamin :
>>
>> On 14 March 2016 at 12:07, Arie van Wingerden wrote:
>> > that is weird. I am using Windows 10 and get exactly the same "warnin
maandag, 14 maart 2016, 06:04PM +0100 van Oscar Benjamin
:
>I've fixed the quoting below. Can you not top-post please Arie?
>On 14 March 2016 at 16:59, Arie van Wingerden < xapw...@gmail.com > wrote:
>> 2016-03-14 15:59 GMT+01:00 Oscar Benjamin < oscar.j.benja...@gmail.com >:
>>>
>>> On 14 March
On 13/03/2016 20:12, Marko Rauhamaa wrote:
BartC :
Exactly why having ready-made solutions is preferable to everyone
hacking their own solutions to switch.
A developer friend of mine once said insightfully that the point of OO
is getting rid of switch statements. IOW, most use cases for switc
On Monday, March 14, 2016 at 9:06:01 PM UTC+5:30, Mark Lawrence wrote:
> On 13/03/2016 13:20, Veek. M wrote:
> > Thomas 'PointedEars' Lahn wrote:
> >
> Nobility lies in action, not in name.
> --Surak
> >
> > Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad
On 14 March 2016 at 17:15, Arie van Wingerden wrote:
> I've fixed the quoting below. Can you not top-post please Arie?
> On 14 March 2016 at 16:59, Arie van Wingerden < xapw...@gmail.com > wrote:
>> 2016-03-14 15:59 GMT+01:00 Oscar Benjamin < oscar.j.benja...@gmail.com >:
>>>
>>> On 14 March 2016
maandag, 14 maart 2016, 06:21PM +0100 van Oscar Benjamin
:
>On 14 March 2016 at 17:15, Arie van Wingerden < xapw...@gmail.com > wrote:
>> I've fixed the quoting below. Can you not top-post please Arie?
>> On 14 March 2016 at 16:59, Arie van Wingerden < xapw...@gmail.com > wrote:
>>> 2016-03-14 1
On Sunday, March 13, 2016 at 5:11:50 AM UTC-5, Steven D'Aprano wrote:
> On Sun, 13 Mar 2016 03:44 am, Ian Kelly wrote:
>
> > On Fri, Mar 11, 2016 at 7:39 PM, Rick Johnson
> > wrote:
> >> At run-time, i don't care how large a "module namespace" may be.
> >> Sometimes a module namespace will be sma
On 3/14/2016 12:53 PM, Rick Johnson wrote:
Since you are using Python 3.5.1 on a windows box, you'll
want to download and install the executable named
"pygame-1.9.1-py3.1.msi". You can get it here:
http://www.pygame.org/download.shtml
Or get pygame-1.9.2a0-cp35-none-win32.whl from
http://w
On 14/03/2016 17:17, Mark Lawrence wrote:
On 13/03/2016 20:12, Marko Rauhamaa wrote:
BartC :
Exactly why having ready-made solutions is preferable to everyone
hacking their own solutions to switch.
A developer friend of mine once said insightfully that the point of OO
is getting rid of switc
On 03/14/2016 08:43 AM, BartC wrote:
> But how do you pass 'a' itself?
>
> Perhaps you can say:
>
>f('a')
>
> and f can do some sort of lookup, if it knows the caller's context, for
> such a name and retrieve the value that way. But that's rather
> heavy-handed, and f can't distinguish bet
On Friday, March 11, 2016 at 6:39:53 PM UTC-8, Rick Johnson wrote:
> On Friday, March 11, 2016 at 9:48:22 AM UTC-6, Ian wrote:
> > On Thu, Mar 10, 2016 at 5:45 PM, Rick Johnson
> > The honorable Rick Johnson wrote:
> > > Many times, i would have preferred to define my module space
> > > across mult
BartC :
> (Code-smell to me means code dominated by loads of classes, especially
> for no good reason. But I'm not suggesting a language shouldn't have
> them.)
Ok, you don't like OO. Fine. Python is deep in OO.
"When in Rome, do as the Romans do."
Personally, I think OO is quite a cromulent pa
On 9 March 2016 at 20:09, Drimades wrote:
> I'm doing some tests with operations on numpy matrices in Python. As an
> example, it takes about 3000 seconds to compute eigenvalues and eigenvectors
> using scipy.linalg.eig(a) for a matrix 6000x6000. Is it an acceptable time?
I don't know really bu
On 14/03/2016 18:25, Marko Rauhamaa wrote:
BartC :
(Code-smell to me means code dominated by loads of classes, especially
for no good reason. But I'm not suggesting a language shouldn't have
them.)
Ok, you don't like OO. Fine. Python is deep in OO.
"When in Rome, do as the Romans do."
Perso
On Mon, Mar 14, 2016 at 10:53 AM, Rick Johnson
wrote:
> If you download and run an installer, one that is
> appropriate for your operating system and Python version,
> everything will be taken care of for you.
>
> Since you are using Python 3.5.1 on a windows box, you'll
> want to download and ins
On Mon, 14 Mar 2016 14:43:22 +, BartC wrote:
> On 13/03/2016 09:39, Steven D'Aprano wrote:
>> On Sun, 13 Mar 2016 04:54 am, BartC wrote:
>
>>> Common sense tells you it is unlikely.
>>
>> Perhaps your common sense is different from other people's common
>> sense. To me, and many other Python
On 14/03/2016 19:45, alister wrote:
On Mon, 14 Mar 2016 14:43:22 +, BartC wrote:
On 13/03/2016 09:39, Steven D'Aprano wrote:
On Sun, 13 Mar 2016 04:54 am, BartC wrote:
Common sense tells you it is unlikely.
Perhaps your common sense is different from other people's common
sense. To me
On 14/03/2016 17:53, BartC wrote:
On 14/03/2016 17:17, Mark Lawrence wrote:
On 13/03/2016 20:12, Marko Rauhamaa wrote:
BartC :
Exactly why having ready-made solutions is preferable to everyone
hacking their own solutions to switch.
A developer friend of mine once said insightfully that the
Hi all,
I am made a little progress on using python.
I have five files to read from different sources and concatenate them to one
file. From each file I want only to pick few column (x1, x2 and x3).
However, these columns say x3 was a date in one file it was recorded as a
character
Am 14.03.16 um 21:31 schrieb BartC:
There are good reasons for wanting to do so. Try writing this function
in Python:
def swap(a,b):
b,a = a,b
x="one"
y="two"
swap(x,y)
print (x,y)
so that it displays "two" "one".
The pervert thing is that this is nearly there:
def swap(a,b):
On 14/03/2016 20:31, BartC wrote:
On 14/03/2016 19:45, alister wrote:
On Mon, 14 Mar 2016 14:43:22 +, BartC wrote:
On 13/03/2016 09:39, Steven D'Aprano wrote:
On Sun, 13 Mar 2016 04:54 am, BartC wrote:
Common sense tells you it is unlikely.
Perhaps your common sense is different from
On Mon, Mar 14, 2016 at 11:32 AM, Rick Johnson
wrote:
> Ignoring Tkinter, which is a gawd awful mess, how would you
> re-organize the 3,656 symbols in OpenGL.GL into smaller
> modules, without dividing them up along some random or
> arbitrary lines?
In that particular case, I wouldn't, except pos
On 3/14/2016 4:56 PM, Val Krem via Python-list wrote:
Hi all,
I am made a little progress on using python.
I have five files to read from different sources and concatenate them to one
file. From each file I want only to pick few column (x1, x2 and x3).
However, these columns say x3 w
On 14/03/2016 21:00, Christian Gollwitzer wrote:
Am 14.03.16 um 21:31 schrieb BartC:
There are good reasons for wanting to do so. Try writing this function
in Python:
def swap(a,b):
b,a = a,b
x="one"
y="two"
swap(x,y)
print (x,y)
so that it displays "two" "one".
The pervert thing is t
On 14/03/2016 21:09, Ian Kelly wrote:
On Mon, Mar 14, 2016 at 11:32 AM, Rick Johnson
wrote:
Ignoring Tkinter, which is a gawd awful mess, how would you
re-organize the 3,656 symbols in OpenGL.GL into smaller
modules, without dividing them up along some random or
arbitrary lines?
In that parti
On 14/03/2016 21:23, Mark Lawrence wrote:
Python 2.8, RickedPython, and the latest entry into the race,
BartCPython, all vapourware.
I'm not creating a new version of Python or CPython (you should have
used an underscore).
But I do have considerable experience of creating dynamically-typed
Wells Fargo online will not allow you to change a payee's address. You
have to delete the account and re enter it.
I have had most of my bills on autopay for at least 15 years. The
last utility company to make the change was the water company. For
some reason their system could not take checks f
On 14/03/2016 22:07, BartC wrote:
On 14/03/2016 21:23, Mark Lawrence wrote:
Python 2.8, RickedPython, and the latest entry into the race,
BartCPython, all vapourware.
I'm not creating a new version of Python or CPython (you should have
used an underscore).
But I do have considerable experien
On 14/03/2016 22:10, Seymore4Head wrote:
Wells Fargo online will not allow you to change a payee's address. You
have to delete the account and re enter it.
I have had most of my bills on autopay for at least 15 years. The
last utility company to make the change was the water company. For
some
On Mon, Mar 14, 2016 at 6:25 PM, Mark Lawrence
wrote:
> On 14/03/2016 22:10, Seymore4Head wrote:
>
>> Wells Fargo online will not allow you to change a payee's address. You
>> have to delete the account and re enter it.
>>
>> I have had most of my bills on autopay for at least 15 years. The
>> l
On 14/03/2016 22:20, Mark Lawrence wrote:
On 14/03/2016 22:07, BartC wrote:
On 14/03/2016 21:23, Mark Lawrence wrote:
Python 2.8, RickedPython, and the latest entry into the race,
BartCPython, all vapourware.
I'm not creating a new version of Python or CPython (you should have
used an unders
On Monday, March 14, 2016 at 2:06:02 PM UTC-5, Ian wrote:
> On Mon, Mar 14, 2016 at 10:53 AM, Rick Johnson
> wrote:
> > If you download and run an installer, one that is
> > appropriate for your operating system and Python version,
> > everything will be taken care of for you.
> >
> > Since you ar
On Sunday, March 13, 2016 at 6:35:40 PM UTC-5, Gregory Ewing wrote:
> Unless the module is doing something obscure, you can
> still find [it's source file] by following the chain of
> imports. [...] True, it's not *always* that easy, but in
> the vast majority of cases it is.
I agree you have a va
On Tue, Mar 15, 2016 at 9:58 AM, Rick Johnson
wrote:
> On Monday, March 14, 2016 at 2:06:02 PM UTC-5, Ian wrote:
>> On Mon, Mar 14, 2016 at 10:53 AM, Rick Johnson
>> wrote:
>> > If you download and run an installer, one that is
>> > appropriate for your operating system and Python version,
>> > e
On 14/03/2016 22:40, BartC wrote:
On 14/03/2016 22:20, Mark Lawrence wrote:
On 14/03/2016 22:07, BartC wrote:
On 14/03/2016 21:23, Mark Lawrence wrote:
Python 2.8, RickedPython, and the latest entry into the race,
BartCPython, all vapourware.
I'm not creating a new version of Python or CPyt
On Mon, 14 Mar 2016 06:39 am, BartC wrote:
> class switch(object):
> value = None
> def __new__(class_, value):
> class_.value = value
> return True
>
> def case(*args):
> return any((arg == switch.value for arg in args))
That's quite a clever use of a class. By
On 14/03/2016 23:19, Mark Lawrence wrote:
On 14/03/2016 22:40, BartC wrote:
Was that in Python? It was /supposed/ to be dreadful. I was making a
case for it to be supported directly.
You mean the huge great long list of hard coded function calls. They
are directly supported. So is the loop
On Mon, 14 Mar 2016 20:56:44 +, Val Krem wrote:
> #!/usr/bin/python
On some Linux systems python is installed in /usr/local/bin.
I would suggest the hash-bang below then python will run no
matter where it was installed...
#!/usr/bin/env python
As a python newbie myself, I can't really give
On Tue, 15 Mar 2016 02:06 am, Oscar Benjamin wrote:
> On 14 March 2016 at 14:35, Rick Johnson
> wrote:
>>
>> I would strongly warn anyone against using the zip function
>> unless
> ...
>> I meant to say: absolutely, one hundred percent *SURE*, that
>> both sequences are of the same length, or, ab
On Tue, Mar 15, 2016 at 10:56 AM, BartC wrote:
> I disagree. And presumably so do others as there are so many different
> attempts to implement switch, with varying degrees of success. Here's how I
> do it outside Python:
>
> switch c
> when 'A'..'Z','a'..'z','_' then
> ++name
> when '0'..
On 03/14/2016 05:19 PM, Mark Lawrence wrote:
> On 14/03/2016 22:40, BartC wrote:
> > [...a polite and reasonable comment...]
>
> Drivel. Any establised member of this community, or any other
> community for that matter, will always publish, unless, like the RUE,
> they've got something to hide. S
On Tue, Mar 15, 2016 at 11:17 AM, rurpy--- via Python-list
wrote:
> On 03/14/2016 05:19 PM, Mark Lawrence wrote:
>> On 14/03/2016 22:40, BartC wrote:
>> > [...a polite and reasonable comment...]
>>
>> Drivel. Any establised member of this community, or any other
>> community for that matter, will
On 14/03/2016 23:56, BartC wrote:
On 14/03/2016 23:19, Mark Lawrence wrote:
On 14/03/2016 22:40, BartC wrote:
Was that in Python? It was /supposed/ to be dreadful. I was making a
case for it to be supported directly.
You mean the huge great long list of hard coded function calls. They
are
In Python is it possible to comparison-equate a variable to a List, Tupple, or
Set and have it return True if the contents of the variable matches an element
in the List, Tupple, or Set.
E.g.
x = "apple"
x-list = ["apple", "banana", "peach"]
If x == x-list:
print('Comparison is True')
els
On 14/03/2016 23:24, Steven D'Aprano wrote:
On Mon, 14 Mar 2016 06:39 am, BartC wrote:
class switch(object):
value = None
def __new__(class_, value):
class_.value = value
return True
def case(*args):
return any((arg == switch.value for arg in args))
That
On Mon, Mar 14, 2016 at 8:26 PM, wrote:
> In Python is it possible to comparison-equate a variable to a List,
> Tupple, or Set and have it return True if the contents of the variable
> matches an element in the List, Tupple, or Set.
>
> E.g.
>
> x = "apple"
>
> x-list = ["apple", "banana", "peach
On Tue, Mar 15, 2016 at 11:26 AM, wrote:
> In Python is it possible to comparison-equate a variable to a List, Tupple,
> or Set and have it return True if the contents of the variable matches an
> element in the List, Tupple, or Set.
>
> E.g.
>
> x = "apple"
>
> x-list = ["apple", "banana", "pe
On 15/03/2016 00:26, jj0gen0i...@gmail.com wrote:
In Python is it possible to comparison-equate a variable to a List, Tupple, or
Set and have it return True if the contents of the variable matches an element
in the List, Tupple, or Set.
It's actually "tuple", but what the heck :)
E.g.
x =
On 15/03/2016 00:25, Chris Angelico wrote:
On Tue, Mar 15, 2016 at 11:17 AM, rurpy--- via Python-list
wrote:
On 03/14/2016 05:19 PM, Mark Lawrence wrote:
On 14/03/2016 22:40, BartC wrote:
[...a polite and reasonable comment...]
Drivel. Any establised member of this community, or any other
On 15/03/2016 00:12, Chris Angelico wrote:
On Tue, Mar 15, 2016 at 10:56 AM, BartC wrote:
switch c
when 'A'..'Z','a'..'z','_' then
++name
Anything so terrible about that that Python needs to keep well clear of or
that you think its users should be deprived of?
Yes: the complete
On 15/03/2016 00:25, BartC wrote:
[snip I really don't know what, it certainly isn't Python]
when etx,0 then
else# unicode goes here...
end switch
As John McEnroe famously said, "You cannot be serious".
--
My fellow Pythonistas, ask not what our language can do for you, ask
what
On Tue, Mar 15, 2016 at 11:47 AM, Mark Lawrence wrote:
> Same old story. BartC spouts drivel, just like the RUE, or Nick "The
> Webmaster" Greek, I'm in trouble for pointing it out. When he provides some
> *EVIDENCE* to back up his claims then I'll more than happily back off. I do
> not intend
On Tue, Mar 15, 2016 at 11:54 AM, BartC wrote:
>> In Python, there's no reason to restrict 'switch'
>> to integers, so I would expect its semantics to be based on either
>> equality comparisons or inequality comparisons
>
>
> I use two forms of switch: one for integers only (very fast), and the ot
On 15/03/2016 00:28, Mark Lawrence wrote:
On 14/03/2016 23:56, BartC wrote:
Anything so terrible about that that Python needs to keep well clear of
or that you think its users should be deprived of?
Yes, it is not even valid Python. Switch has been rejected via at least
one PEP and from wha
On Tue, 15 Mar 2016 01:43 am, BartC wrote:
> On 13/03/2016 09:39, Steven D'Aprano wrote:
>> On Sun, 13 Mar 2016 04:54 am, BartC wrote:
>
>>> Common sense tells you it is unlikely.
>>
>> Perhaps your common sense is different from other people's common sense.
>> To me, and many other Python progra
On Tue, 15 Mar 2016 06:45 am, alister wrote:
> On Mon, 14 Mar 2016 14:43:22 +, BartC wrote:
[...]
> > Perhaps it's time to talk about something which many languages have, but
> > Python hasn't. Not as far as I know anyway.
> >
>> That's references to names (sometimes called pointers). So if
On Tue, Mar 15, 2016 at 12:10 PM, BartC wrote:
> The one-byte-code switch works when all case expressions are known at
> compile-time. It makes use of a jump-table within the byte-code.
>
> The total sequence will be more than one byte-code, typically:
>
> LOAD_FASTThe index
> SWIT
On 15/03/2016 00:58, Chris Angelico wrote:
On Tue, Mar 15, 2016 at 11:54 AM, BartC wrote:
In Python, there's no reason to restrict 'switch'
to integers, so I would expect its semantics to be based on either
equality comparisons or inequality comparisons
I use two forms of switch: one for int
Thanks to all for the responses. Very new to Python, and thought there should
be a way to do it.
JJ
--
https://mail.python.org/mailman/listinfo/python-list
1 - 100 of 124 matches
Mail list logo