Right solution to unicode error?

2012-11-07 Thread Anders
ry to print the tasks' subjects, one of the tasks is generating an error: Traceback (most recent call last): File "outlook_tasks.py", line 66, in my_tasks.dump_today_tasks() File "C:\Users\Anders\code\Task List\tasks.py", line 29, in dump_today_tasks print task.s

PyQt app in seperate thread

2006-11-22 Thread anders
n the close button does nothing and I have to force the program to quit. There's got to be a way to get this working, right? Can anyone help me along the right path? Cheers, Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt app in seperate thread

2006-11-22 Thread anders
Phil Thompson wrote: > On Wednesday 22 November 2006 12:37 pm, anders wrote: > > I am writing a plugin for a piece of software in python, and I want to > > start up a PyQt GUI in the plugin, without stalling the main thread > > while the gui is running (later i will want to

Re: PyQt app in seperate thread

2006-11-22 Thread anders
Phil Thompson wrote: > On Wednesday 22 November 2006 2:06 pm, anders wrote: > > Phil Thompson wrote: > > > On Wednesday 22 November 2006 12:37 pm, anders wrote: > > > > I am writing a plugin for a piece of software in python, and I want to > > > >

Re: PyQt app in seperate thread

2006-11-22 Thread anders
to be the way to go... I can't run the main app in a child thread, so I'll have to spawn the GUI as a seperate process and communicate with it. Didn't know about pyro though, thanks for the link. You've used it successfully with PyQt in a seperate process? Cheers, Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read the directory which the actively running python file is located in?

2006-12-01 Thread anders
in os module there is many funktion/methods to extract this information to ask the path to the current running pythonprogram you can do likes this - CUT--- import os print os.getcwd() - CUT -- // Anders Michael Malinowski skrev: > Is there a way to read the directory t

Re: How to read the directory which the actively running python file is located in?

2006-12-01 Thread anders
in os module there is many funktion/methods to extract this information to ask the path to the current running pythonprogram you can do likes this - CUT--- import os print os.getcwd() - CUT -- // Anders Michael Malinowski skrev: > Is there a way to read the directory t

I have a chance to do somting diffrent way not Python ?!

2007-04-28 Thread anders
n all servers. So basicly i like advice about interac with os, compiler etc. Nice webblinks to read more and do/don't things. best regards Anders -- http://mail.python.org/mailman/listinfo/python-list

GUI and distrubution

2007-08-24 Thread anders
installtion a lott och other stuff. My next question is witch is the best GUI to use, also consider the delivery question above. // Anders -- http://mail.python.org/mailman/listinfo/python-list

search speed

2009-01-30 Thread anders
hope someone understand my beginner question what i am looking for is somting like if file.findInFile("LF01"): ... Is there any library like this ?? Best Regards Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: search speed

2009-01-31 Thread anders
Tanks everyone that spent time helping my, the help was great. Best regards Anders -- http://mail.python.org/mailman/listinfo/python-list

RE: Right solution to unicode error?

2012-11-08 Thread Anders Schneiderman
Thanks, Oscar and Ramit! This is exactly what I was looking for. Anders > -Original Message- > From: Oscar Benjamin [mailto:oscar.j.benja...@gmail.com] > Sent: Wednesday, November 07, 2012 6:27 PM > To: Anders Schneiderman > Cc: python-list@python.org > Subject: Re:

Create a contact book

2021-10-25 Thread anders Limpan
i would like to create a contact book were you can keep track of your friends. With this contact book you will both be able to add friends and view which friends that you have added. anyone interested in helping me out with this one ?=) -- https://mail.python.org/mailman/listinfo/python-list

Re: Sorting NaNs

2018-06-10 Thread Anders Munch
NaN as a 'No Data' placeholder). 3) Raise an exception. I can't believe anyone even suggested 2).  "In the face of ambiguity, refuse the temptation to guess." regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: Sorting NaNs

2018-06-11 Thread Anders Munch
Steven D'Aprano: It is not a guess if the user explicitly specifies that as the behaviour. If that was the context, sure, no problem. - Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: books: Dive into Python vs Beginning Python

2005-11-28 Thread Anders Eriksson
ourself if it's any good (which I think it is!) http://diveintopython.org/ // Anders -- English isn't my first, or second, language. So anything rude or strange are due to the translation -- http://mail.python.org/mailman/listinfo/python-list

Re: python connect to server using SSH protocol

2005-02-08 Thread Simon Anders
Hi Laszlo Zsolt Nagy wrote: [EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). In advance, I'm not sure if I understood your problem. SSH is clearly

Operators as functions

2004-12-20 Thread Anders Andersson
map, filter and listcomprehension etc. I hope it is possible in Python too. In Haskell I would write: foldr (++) [] Thank you for answering! -- Anders Andersson -- http://mail.python.org/mailman/listinfo/python-list

Re: Operators as functions

2004-12-21 Thread Anders Andersson
Steve Holden wrote: Anders Andersson wrote: Hello I want to concatinate (I apologize for bad English, but it is not my native language) a list of strings to a string. I could use (I think): s = "" map(lambda x: s.append(x), theList) But I want to do something like (I think that the cod

Re: Operators as functions

2004-12-21 Thread Anders Andersson
Peter Hansen wrote: Anders Andersson wrote: I want to concatinate (I apologize for bad English, but it is not my native language) a list of strings to a string. I could use (I think): s = "" map(lambda x: s.append(x), theList) But I want to do something like (I think that the cod

Hello Group and how to practice?

2015-05-31 Thread Anders Johansen
Hi my name is Anders I am from Denmark, and I am new to programming and python. Currently, I am doing the codecademy.com python course, but sometime I feel that the course advances to fast and I lack repeating (practicing) some of the concepts, however I don't feel confident enough to

Re: Hello Group and how to practice?

2015-05-31 Thread Anders Johansen
Den søndag den 31. maj 2015 kl. 16.22.10 UTC+2 skrev Cem Karan: > On May 31, 2015, at 9:35 AM, Anders Johansen wrote: > > > Hi my name is Anders I am from Denmark, and I am new to programming and > > python. > > > > Currently, I am doing the codecademy.com pyth

Calling JavaScript inside the webbrowser module

2011-10-30 Thread Anders Gunnarsson
Hi! Is there anyway to communicate with JavaScript inside a website opened via the webbrowser module? | import webbrowser | webbrowser.open('http://python.org') Here I'd like to do something like webbrowser.call('alert(1)') and I'd like to be able to call the python app from javascript too. I'

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Anders Hammarquist
to a function argument. Those confused are expecting Python function arguments to behave just like C++ references (which are just syntactic sugar for a dereferenced pointer) or an Ada "in out" parameter when assigned. Python doesn't, because in Python assignment assigns a new r

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Anders Hammarquist
d data, and attValue is what the macro wants to append. --->8--- newAttrVal = [] for x, y in map(None, oldAttrVal, attrValue): newAttrVal.append(u''.join((x or '', y or ''))) --->8--- /Anders -- -- Of course I'm crazy, but that doesn&

PyMorphic Project

2006-08-07 Thread Anders Österholm
on this project are welcome./Anders Österholm -- http://mail.python.org/mailman/listinfo/python-list

Re: Can not download plugins for jEdit (help!!)

2006-11-09 Thread Anders Arnholm
Ant <[EMAIL PROTECTED]> skriver: >> Vim, it can handle all the things.http://www.vim.org/ > > I'm not convinced of that quite yet. jEdit's syntax highlighting seems > more robust (see SocketServer.py in the standard library for an example > - vim gets the highlighting of the first doc-comment wrong

Observer implementation question ('Patterns in Python')

2007-10-12 Thread Anders Dahnielson
Sorry if this is a somewhat silly question... I'm using the Observer implementation found in 'Patterns in Python' [1] and find it really neat. But, I have not yet fully groked the new-style class, classic class and property differences involved. So can somebody please explain to me why this works

Re: Observer implementation question ('Patterns in Python')

2007-10-13 Thread Anders Dahnielson
Thank you, James and Stargaming, for your replies! -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting to an SSH account over a HTTP proxy

2007-01-23 Thread Anders Arnholm
makes a good way to tunnel IP also :-) / Anders -- http://anders.arnholm.nu/Keep on Balping -- http://mail.python.org/mailman/listinfo/python-list

Re: c++ for python programmers

2007-02-14 Thread Anders Arnholm
Sam <[EMAIL PROTECTED]> skriver: > On 13 Feb 2007 17:51:00 GMT, Jorgen Grahn ><[EMAIL PROTECTED]> wrote: >> Well, C++ is a better language than C in many ways. So, if he needs to learn >> one of them, why does it have to be C? >> >> Another reason some people choose C++ over Python for some tasks i

Re: c++ for python programmers

2007-02-15 Thread Anders Arnholm
Nicola Musatti <[EMAIL PROTECTED]> skriver: > On Feb 14, 2:41 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > [...] >> Don't forget the lack of standard garbage collection. > memory related problems. I'm aware that most is not the same as all, > but on the other hand garbage collection has it's probl

List all files using FTP

2008-03-06 Thread Anders Eriksson
Hello, I need to list all the files on my FTP account (multiple subdirectories). I don't have shell access to the account. anyone that has a program that will do this? // Anders -- English is not my first, or second, language so anything strange, or insulting, is due to the translation. P

Re: List all files using FTP

2008-03-07 Thread Anders Eriksson
On Thu, 6 Mar 2008 20:07:46 +, Simon Brunning wrote: > This might be of use: > > <http://ftputil.sschwarzer.net/trac> Nice, Just what I needed! Thank you! // Anders -- English is not my first, or second, language so anything strange, or insulting, is due to the tran

Re: [NEWBIE] csv to excel format problem

2008-10-15 Thread Anders Eriksson
one will probably point them out ;-) // Anders -- English is not my first, or second, language so anything strange, or insulting, is due to the translation. Please correct me so I may improve my English! On Tue, 14 Oct 2008 03:03:52 -0700 (PDT), MM wrote: > Hi to all, > > I'm tr

Downloading binary files - Python3

2009-03-21 Thread Anders Eriksson
instead it will be printed at the same time as print("Done!"). This I would like to have the way I intended. Is downloading a binary file using: srcdata = urlopen(url).read() the best way? Is there some other way that would speed up the downloading? // Anders -- English is not my firs

I want to use a C++ library from Python

2008-09-10 Thread Anders Eriksson
Hello, I have a C++ library compiled as Windows DLL's. It consists of 32 .h and 1 .lib and 1 .dll files. I don't have the source code. How can I create a Python module from these files? // Anders -- English is not my first, or second, language so anything strange, or insulting, is

Re: I want to use a C++ library from Python

2008-09-10 Thread Anders Eriksson
test code. > I have looked (very briefly) at the three framework you mention but they all need the source code of the C++? I don't have the source code! Just the header files and the library and dll. Have I overlooked something or am I just screwed? // Anders -- English is not my fi

is py2exe still active ?

2010-12-07 Thread Anders Persson
Hi! When a look att py2exe homepage it is not looking like mutch happen, as a beginner i was thinking to start with Python 3, but i like to now if py2exe will be for 3 too. Is any one have any info ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Books recommendation

2010-12-07 Thread Anders Persson
You can't compile Python to exe files, but there is program packing your script to a exe files, look att www.py2exe.org Beware that you must have py2exe version match your pythonversion and att current time the highest version is 2.7. /A On Dec 7, 2:39 pm, "Octavian Rasnita" wrote: > Hello, >

Re: grimace: a fluent regular expression generator in Python

2013-07-16 Thread Anders J. Munch
merican_number_re = RE.compile(r""" ^ ( \d{3} ) # Definite improvement, though I really miss putting - \d{3} # literals in quotes. - \d{4} $ """) It's too bad re.VERBOSE isn't the default. regards, Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs -vs- Spaces: Tabs should have won.

2011-07-17 Thread Anders J. Munch
ite real spaces to the file in consequence. Just like in the old days:) regards, Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs -vs- Spaces: Tabs should have won.

2011-07-18 Thread Anders J. Munch
Thomas 'PointedEars' Lahn wrote: > I am getting the idea here that you mean the right thing, but that you > explain it wrong. Feel free to write the much longer essay that explains it all unambiguously, I'm not going to. regards, Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Anders Wegge Keller
På Sat, 17 Feb 2018 15:05:34 +1100 Ben Finney skrev: > boB Stepp writes: > He blithely conflates “weakly typed” (Python objects are not weakly, but > very strongly typed) Python is more strongly typed than PHP, but that doesn't really say much. However, compared to a language like C, there a

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Anders Wegge Keller
På Sun, 18 Feb 2018 07:34:03 -0500 Richard Damon skrev: > Python is much stronger typed than PHP, because in PHP you can do things > like 1 + '2' and get 3, as string values will naturally convert > themselves to numbers, Python won't do this. Yes Python will freely > convert between numeric t

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Anders Wegge Keller
På Mon, 19 Feb 2018 08:47:14 +1100 Tim Delaney skrev: > On 18 February 2018 at 22:55, Anders Wegge Keller wrote: > > That list is not only weakly typed, but rather untyped. There are no > > safeguards in the language, that enforce that all elements in a list or > > other

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Anders Wegge Keller
På Mon, 19 Feb 2018 04:39:31 + (UTC) Steven D'Aprano skrev: > On Mon, 19 Feb 2018 04:26:32 +0100, Anders Wegge Keller wrote: > > > På Mon, 19 Feb 2018 08:47:14 +1100 > > Tim Delaney skrev: > >> On 18 February 2018 at 22:55,

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Anders Wegge Keller
På Mon, 19 Feb 2018 15:15:19 + (UTC) Steven D'Aprano skrev: > On Mon, 19 Feb 2018 14:06:36 +0100, Anders Wegge Keller wrote: > > > Array is not even close to providing a strongly typed container. > > That's a mighty powerful claim that goes against the do

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-20 Thread Anders Wegge Keller
På Tue, 20 Feb 2018 12:28:25 + (UTC) Steven D'Aprano skrev: > On Mon, 19 Feb 2018 16:34:29 +0100, Anders Wegge Keller wrote: > > > På Mon, 19 Feb 2018 15:15:19 + (UTC) Steven D'Aprano > > skrev: > >> On Mon, 19 Feb 2018 14:0

Re: Python slang

2016-08-10 Thread Anders J. Munch
Lawrence D’Oliveiro: >> [...] as much like C++ as >> possible. > > Nevertheless, Python copied the C misfeature [...] You segued a little too easily from C++ to C. When talking language evolution and inspirations, they are entirely different things. - Anders -- https://mail.

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-31 Thread Anders Wegge Keller
På Sat, 31 Mar 2018 11:58:39 -0400 Etienne Robillard skrev: > Are you trolling? Do you understand that a modern mobile device > typically require a Internet subscription and an additional subscription > for the smart phone? I think the question is why you equate python3 with the need for inte

Re: want to export some of the packets from a big pacp file to another file.

2018-04-05 Thread Anders Wegge Keller
På Thu, 5 Apr 2018 08:06:10 -0700 (PDT) supsw...@gmail.com skrev: > Hi, > > I am using dpkt python package to parse .pcap file and I am able to do > successfully. > > My requirement is to filter some of the traffic from the big .pcap file > and to export the result to another file. > > I don't k

Re: object types, mutable or not?

2018-05-17 Thread Anders Wegge Keller
På Wed, 16 May 2018 14:48:27 +0100 Paul Moore skrev: > C++ called that an "rvalue". And then went on to define things that > could go on the left hand side of an assignment as "lvalues". And now > we have two confusing concepts to explain - see what happens when you > let a standards committee de

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Anders Wegge Keller
> The buzzing noise you just heard was the joke whizzing past your head > *wink* I have twins aged four. They also like to yell "I cheated!", whenever they are called out. In general, you need to get rid of tat teenage brat persona you practice. The "ranting rick" charade was especially toe-

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Anders Wegge Keller
På Mon, 16 Jul 2018 11:33:46 -0700 Jim Lee skrev: > Go right ahead.  I find it surprising that Stephen isn't banned, > considering the fact that he ridicules anyone he doesn't agree with.  > But I guess he's one of the 'good 'ol boys', and so exempt from the code > of conduct. Well said! --

Re: Non-GUI, single processort inter process massaging - how?

2018-07-23 Thread Anders Wegge Keller
På Sat, 21 Jul 2018 09:07:23 +0100 Chris Green skrev: > So - what's the best approach to this? I've done some searching and > most/many of the solutions seem rather heavyweight for my needs. Am I > overlooking something obvious or should I try rethinking the original > requirement and look for a

PEP 394

2018-10-19 Thread Anders Wegge Keller
Short and simple: Do you expect PEP 394 to change status or recommendation when official support for Python2 ends in 13½ months time, or at least some time thereafter? For those that don't have the habit of memorizing PEPs, 394 is the one stating * python2 will refer to some version of Python 2

Re: logging output

2018-10-19 Thread Anders Wegge Keller
På Fri, 19 Oct 2018 08:05:28 -0700 (PDT) Sharan Basappa skrev: ... > delimiter=r'\s"') #data_df = pd.read_csv("BGL_MERGED.log") > logger.debug("data frame %s \n", data_df) Do this help? -- //Wegge -- http

Re: PEP 394

2018-10-20 Thread Anders Wegge Keller
På Sat, 20 Oct 2018 12:57:45 +1100 Ben Finney skrev: > Anders Wegge Keller writes: > > > Short and simple: Do you expect PEP 394 to change status > > The status of PEP 394 today is “Active”. What change of status would you > expect in this Informational PEP? One pos

Re: Recursive method in class

2019-09-30 Thread Anders Märak Leffler
... return 999 ... >>> instance.factorial(5) # Where will the call go ("old" or "new" >>> factorial?)? Where will possible recursive calls go (and why)? Hello! 4995 Oh, and as others have pointed out on this list - you/whoever runs the system sending the

Re: Speed ain't bad

2005-01-01 Thread Anders J. Munch
ir) with: try: os.makedirs(zfdir) except EnvironmentError: pass then not only will your script become a micron more robust, but assuming zfdir typically does not exist, you will have saved the call to os.path.isdir. - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: Speed ain't bad

2005-01-04 Thread Anders J. Munch
if the relevant part of the > filesystem wasn't already in memory, the isdir() call would make it > so, and makedirs() would get a free ride, yes/no? Perhaps. Looking stuff up in operating system tables and buffers takes time too. And then there's network latency; how much local ca

Reference counting and the use of PYTHONDUMPREFS

2014-01-18 Thread Anders Wegge Keller
During the final test of a bit of embedded python, I wanted to see if I had any hanging references. To my suprise, I ended up with a rather large amount, after running combinerefs.py. And even with the simplest[1] possible use of embedding, I end up with 13475 still-living references. If this i

Re: Separate Address number and name

2014-01-21 Thread Anders Wegge Keller
Shane Konings writes: > I have struggled with this for a while and know there must be a > simple method to achieve this result. There are several. But without seeing the code you have already written, it's har to help you improve it. -- /Wegge Leder efter redundant peering af dk.*,linux.debi

Re: Separate Address number and name

2014-01-21 Thread Anders Wegge Keller
Shane Konings writes: ... > The following is a sample of the data. There are hundreds of lines > that need to have an automated process of splitting the strings into > headings to be imported into excel with theses headings > ID Address StreetNum StreetName SufType Dir City Province Po

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-02 Thread Anders Wegge Keller
On Mon, 29 Feb 2016 23:29:43 + Mark Lawrence wrote: > On 29/02/2016 22:40, Larry Martell wrote: >> I think for the most part, the mental health industry is most >> interested in pushing drugs and forcing people into some status quo. > I am disgusted by your comments. I'll keep my original

Re: sobering observation, python vs. perl

2016-03-19 Thread Anders J. Munch
ssembled test file doesn't actually contain the phrase 'release_req', so my results may be misleading. Perhaps you'll try it and post your results? regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Parsing and displaying C structs in a semi-intelligent way.

2015-07-17 Thread Anders Wegge Keller
In my day job, we have a large code base of mostly identical projects, each with their own customizations. The customizations can be a real pain sometimes. Especially when debugging binary data. The interesting part of the binary dumps are most often the stuff that are tweaked from project to proj

NaN comparisons - Call For Anecdotes

2014-07-08 Thread Anders J. Munch
alse: Simply provide a counterexample. So that is my challenge: If you have a program (a pre-existing and useful one, not something artificial created for this challenge) that benefits from NaN!=NaN and that would fail if x==x for all float objects x, then please come forward and show it, and I'll buy you a beer the next time I'm at PyCon. regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-08 Thread Anders J. Munch
ion to write or use such an algorithm, why should you? It works on tuples, sets, lists, serial port handles, module objects, pretty much anything you can imagine -- except NaN floats. regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-08 Thread Anders J. Munch
r NaN. I'm fully aware of that. Whether NaN's are one equivalence class or several is not the issue. What matters is the integrity of the equivalence relation. Following the standard isn't a good reason itself? If a standard tells you to jump of a cliff... regards, Anders -

Re: NaN comparisons - Call For Anecdotes

2014-07-08 Thread Anders J. Munch
of law that requires Python to do so. regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-08 Thread Anders J. Munch
Ethan Furman skrev: What exception? Apparently your claims about NaN in Python are all wrong -- have you been using a custom interpreter? >>> float('inf') - float('inf') nan If you deliberately try to manufacture NaN's, you can. I never said oth

Re: NaN comparisons - Call For Anecdotes

2014-07-08 Thread Anders J. Munch
missing data. They generally want NaN propagated and not have some long running calculation crash in the middle. NaN!=NaN doesn't cause NaN's to propagate any more or any less. It simply causes a different branch of code to run, quite often the wrong one. regards, Anders -- https://mail.

Re: NaN comparisons - Call For Anecdotes

2014-07-08 Thread Anders J. Munch
hear any use case. So far I'm 0 beers in debt. regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] == on object tests identity in 3.x

2014-07-08 Thread Anders J. Munch
t math.log? The tradeoffs are different in those languages, so choices the IEEE-754 committee made with C and Fortran in mind may be less relevant for Python. regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-09 Thread Anders J. Munch
d = new ....time.sleep(1) regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-09 Thread Anders J. Munch
ctionaries, time stamps, NoneType's, bools, floating-point floats and a thousand other things, then NaNs stand out as the values that have special algorithm-breaking magic. I gave an example of such an algorithm in an earlier reply to Chris. regards, Anders -- https://mail.python.org/m

Re: NaN comparisons - Call For Anecdotes

2014-07-09 Thread Anders J. Munch
mploy strategies to avoid NaNs ever being compared. I'll take that one step further and say that as long as NaN!=NaN, everyone should seek to avoid NaNs ever being compared. regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-09 Thread Anders J. Munch
is why I proposed two new operators, === and !==, and a change to == and !=, in another thread. Would == always doing an identity test before calling __eq__ solve your problem? If not, what would it take to solve your problem? It would not solve it. Two bitwise identical NaNs would still compare d

Re: NaN comparisons - Call For Anecdotes

2014-07-09 Thread Anders J. Munch
anyone on those lists read python-list also? regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-09 Thread Anders J. Munch
at will lead to improvement of Python, well, I'm not too optimistic, but I feel the point was worth making regardless. regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-14 Thread Anders J. Munch
ython-list. This is about float.__eq__, not about numpy or SciPy. Maybe they just don't like beer? regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: NaN comparisons - Call For Anecdotes

2014-07-15 Thread Anders J. Munch
ist, poll for examples, and come back and earn some beer :) regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 is killing Python

2014-07-15 Thread Anders Wegge Keller
Kevin Walzer writes: > I can only think of two widely used languages in the last decade where > there was this type of major break in binary compatibility: Perl and > Visual Basic. Lua 5.1, 5.2 and 5.3 are all incompatible to some extent. It's debatable how widely used Lua is as a stand-alone l

Is there a tracker target for this mailing list?

2014-07-31 Thread Anders Wegge Keller
My spam filter have an issue with the way mails are sent to this list. If a mail sent to python-list is DKIM-signed, the DKIM-Signature header is kept in the mail. Since the mangling happening during distribution to the list changes one of the signed header fields, rather a lot of the mails to the

Re: Is there a tracker target for this mailing list?

2014-07-31 Thread Anders Wegge Keller
On Thu, 31 Jul 2014 14:57:36 -0400 Terry Reedy wrote: > On 7/31/2014 9:38 AM, Anders Wegge Keller wrote: > > My spam filter have an issue with the way mails are sent to this list. > > If a mail sent to python-list is DKIM-signed, the DKIM-Signature header > > is kept i

Re: Global indent

2014-08-23 Thread Anders Wegge Keller
On Sun, 24 Aug 2014 00:56:11 +1000 Steven D'Aprano wrote: > Despite my comments, I don't actually have any objection to people who > choose to use Emacs, or Vim, or edit their text files by poking the hard > drive platter with a magnetised needle if they prefer :-) But I do think > it's silly of

Re: enumerate improvement proposal

2006-10-30 Thread Anders J. Munch
art, x) for (i, x) in enumerate(items)) - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: QuoteSQL

2006-09-23 Thread Anders J. Munch
enough.""" Presumably because you're expected to use placeholders. When is that not good enough? > elif Ch == "'" or Ch == "\"" or Ch == "\\" : > Ch = "\\" + Ch Always sad to see an SQL DBMS willfully violate the SQL standard. - Anders -- http://mail.python.org/mailman/listinfo/python-list

Relative import first impressions

2006-09-23 Thread Anders J. Munch
oo" binds "foo", equivalent to "from . import foo". Did anyone really expect the name ".foo" to be bound? It's not a big deal though, as you only need to type "from ." once per module anyway. Using another improvement in 2.5, you can now write: from . import ( this, that, ) - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: QuoteSQL

2006-09-24 Thread Anders J. Munch
Robert Kern wrote: > Anders J. Munch wrote: > >> Always sad to see an SQL DBMS willfully violate the SQL standard. > > You must be a constantly depressed person, then. :-) Nah, I just look the other way most of the time *g* - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: QuoteSQL

2006-09-24 Thread Anders J. Munch
ion of SQL? Taking another look, I might be wrong: Your code uses double quotes, and since SQL uses single quotes for string literals, it just might be a compatible extension. Otherwise I would have taken note of the backslash escapes. E.g. '\\' is a two-character SQL string literal. - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-20 Thread Anders J. Munch
rogram in CL, that is to run for unbounded lengths of time? - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-20 Thread Anders J. Munch
Rob Thorpe wrote: > Anders J. Munch wrote: >> Really? So how do you write a portable program in CL, that is to >> run for unbounded lengths of time? > > You can't. > > The thing about the spec not defining GC is almost a bit of humour. > No-one wou

Re: merits of Lisp vs Python

2006-12-21 Thread Anders J. Munch
Rob Thorpe wrote: > Anders J. Munch wrote: >> Let u(t) be the actual memory used by the program at time t. >> Let r(t) be the size of reachable memory at time t. >> >> Require that u(t) is a member of O(t -> max{t'<=t: r(t')}) >> >> There.

Re: Where can I suggest an enchantment for Python Zip lib?

2007-06-10 Thread Anders J. Munch
durumdara wrote: > Only one way I have to control this: if I modify the ZipFile module. Since you already have the desired feature implemented, why don't you submit a patch. See http://www.python.org/patches/ - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-12 Thread Anders J. Munch
s a tuple assignment, and other code paths end with a break out of the loop. Completely mechanical and the resulting code doesn't even look that bad. Like Steven said, tail-call optimisation is not necessary as you can always hand-optimise it yourself. - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-13 Thread Anders J. Munch
Neil Cerutti wrote: > On 2007-06-12, Anders J. Munch <[EMAIL PROTECTED]> wrote: >> Converting tail-recursion to iteration is trivial, and >> perfectly reasonable for a human to do by hand. > > For simple recursive tail calls, yeah, it can be. Translating a > tai

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-13 Thread Anders J. Munch
Alexander Schmolck wrote: > "Anders J. Munch" <[EMAIL PROTECTED]> writes: > >> Like Steven said, tail-call optimisation is not necessary as you can always >> hand-optimise it yourself. > > Care to demonstrate on some code written in CPS (a compiler or pa

  1   2   >