Re: what is this kind of string: b'string' ?

2010-09-04 Thread Martin v. Loewis
Am 04.09.2010 19:27, schrieb Stefan Behnel: > Martin v. Loewis, 04.09.2010 18:52: >> Am 01.09.2010 23:32, schrieb Stef Mientki: >>> in winpdb I see strings like this: >>> >>> >>> a = b'string' >>> >>> a >>>

Re: compile Py2.6 on SL

2010-09-19 Thread Martin v. Loewis
p is in 64-bit and I compiled Python for 32/64bit. I'm skeptical that you did - if you really *had* compiled Python for AMD64, this error would not have occured. Please use file/lipo to verify that the Python library really is available as 64-bit code. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and unicode

2010-09-19 Thread Martin v. Loewis
port unicode_literals at the top of the file to make all string literals Unicode objects. Since Python 3.0, this is the default (i.e. all string literals *are* unicode objects). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and unicode

2010-09-20 Thread Martin v. Loewis
of an encoding declaration, the file encoding is assumed to be UTF-8 (producing an error if it actually is not). So it worked for you by accident. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: weird error with python 2.7 installer under windows 7

2010-09-22 Thread Martin v. Loewis
> Any ideas? Try running the postinstall script by hand. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: pylint -- should I just ignore it sometimes?

2010-10-19 Thread Martin P. Hellwig
On 10/19/10 20:57, Seebs wrote: So, I'm messing around with pylint. Quite a lot of what it says is quite reasonable, makes sense to me, and all that. There's a few exceptions. Well, as with all styles IMHO, if there is a _good_ reason to break it, then by all means do, but you might want to c

Re: pylint -- should I just ignore it sometimes?

2010-10-19 Thread Martin P. Hellwig
On 10/19/10 23:36, Seebs wrote: It seems like a very odd measure of complexity; is it really that unusual for objects to have more than seven meaningful attributes? Speaking without context here, so take it with as much salt as required ;-), it is not that unusual. However there are some thing

Re: pylint -- should I just ignore it sometimes?

2010-10-21 Thread Martin P. Hellwig
On 10/20/10 22:09, Seebs wrote: On 2010-10-20, Matteo Landi wrote: Another situation in which I needed to disable such kind of warnings is while working with graphics modules. I often use variable names such as x, y, z for coordinates, or r,g,b for colors. Would longer names make the reader's l

Re: 64 bit offsets?

2010-10-23 Thread Martin v. Loewis
27;m assuming you're using > Windows) have a 32-bit 'int' type for both 32-bit and 64-bit builds, > and the re module uses Py_BuildValue("i", ...), which according to the > docs uses the C 'int' type, so yes, it's 32 bits even in 64-bit Python. > :

Re: Exception Handling in Python 3

2010-10-24 Thread Martin v. Loewis
nly result in it being set again when exc is raised. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Exception Handling in Python 3

2010-10-25 Thread Martin v. Loewis
ception is specifically being raised > to replace the one currently being handled. I think you have puzzled readers a lot (including me) with the statement: "that Python 3 no longer allows an exception to be raised in an except clause" That certainly isn't the case. Regards,

Re: Suppressing __context__

2010-10-29 Thread Martin v. Loewis
;nosuch'] except KeyError: raise_no_context(AttributeError("No attribute 'nosuch'")) The downside of this is that the innermost frame will be raise_no_context, but I suppose that's ok because even the next-inner frame already reveals implementation details that devel

Re: A bug for raw string literals in Py3k?

2010-10-31 Thread Martin v. Loewis
> So I suppose this is a bug? It's not, see http://docs.python.org/py3k/reference/lexical_analysis.html#literals # Specifically, a raw string cannot end in a single backslash Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-10-31 Thread Martin v. Loewis
y comparing pyc files for example. Tools/scripts/reindent.py of the standard Python distribution normalizes white space in source code. It is used to maintain normalized indentation in the Python library itself, but you can certainly use it also for your own files :-) Regards, Martin -- http://mail.p

Re: Compare source code

2010-10-31 Thread Martin v. Loewis
code lines, most likely, you don't have such comments in your files. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Martin v. Loewis
ogether (in fact, I can't think any situation where I would use the backslash). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: playful coding problems for 10 year olds

2010-11-01 Thread Martin v. Loewis
help. I think anything that has to do with drawing and colors will be attractive, animated if possible. It has to look nice. Take a look at the turtle demos. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python documentation too difficult for beginners

2010-11-02 Thread Martin P. Hellwig
On 11/02/10 10:42, jk wrote: Is there much chance that the Python maintainers will change their documentation system to make it more like Java or PHP? How would I go about trying to make that happen? I am by no means an authority however since you ask it here I feel compelled to give you my opi

Re: Py3: decode subprocess output

2010-11-03 Thread Martin v. Loewis
tricks but it is all beyond my > skills. Please understand that there really aren't "hex characters" here. Each individual character is a byte, i.e. "Sun" == "\x53\x75\x6d". So the strings you get aren't delimited by a "hex character", but by a "con

Re: Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Martin v. Loewis
ve some of the problems by editing the Makefile which it uses to learn the compiler options from. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross compiling (i386 from amd64) with distutils

2010-11-08 Thread Martin v. Loewis
instead of setup.py? No. A python *installation* has a Makefile, in config/Makefile. If you want distutils to use different options, you could edit this Makefile. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: regenerating unicodedata for py2.7 using py3 makeunicodedata.py?

2010-11-13 Thread Martin v. Loewis
. However, there is no guarantee about this property: you will need to check for changes to unicodedata.c to see whether they may affect compatibility. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Pros and cons of Python sources?

2017-11-26 Thread nospam . nospam . Martin Schöön
(Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?=) Den 2017-11-26 skrev Cameron Simpson : > On 25Nov2017 08:34, rusi wrote: >>On Saturday, November 25, 2017 at 9:45:07 PM UTC+5:30, Michael Torrie wrote: >>> The problem with mixing repository-installed packages with pip-installed >>&g

Re: Not fully OO ?

2008-09-21 Thread Martin v. Löwis
le even before the program starts. FWIW, "2+2" is not a good case for OO in Smalltalk, either. In a typical implementation, SmallInteger is not a real class, in the sense that 2 is not a real object. Instead, it lives in a tagged pointer, i.e. it has no identity. Regards, Martin -- htt

scipy.optimize.least_squares for more than one dimension?

2023-06-30 Thread Martin Schöön via Python-list
was burning midnight oil... TIA /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: scipy.optimize.least_squares for more than one dimension?

2023-07-09 Thread Martin Schöön via Python-list
Den 2023-06-30 skrev Martin Schöön : > Yesterday I wanted to move from optimize.leastsq to > least_squares. I have data depending on four variables > and want to fit a function in four variables to this > data. This works with leastsq but not with least_squares. > > Am I tryi

Re: Old matplotlib animation now fails

2024-10-16 Thread Martin Schöön via Python-list
Den 2024-10-15 skrev MRAB : > On 2024-10-15 21:16, Martin Schöön via Python-list wrote: >> Some years ago I created a Python program that reads GPS data and >> It is the second to last line that throws an error: >> >> l.set_data(x0, y0) >> >> The error m

Re: Old matplotlib animation now fails

2024-10-16 Thread Martin Schöön via Python-list
Den 2024-10-15 skrev Stefan Ram : > Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= wrote or quoted: >>l.set_data(x0, y0) > > Well, I got to say, it's pretty rad that you're rocking Python! > That language is the bee's knees, for real. > > As for your que

Re: Old matplotlib animation now fails

2024-10-16 Thread Martin Schöön via Python-list
Den 2024-10-16 skrev Stefan Ram : > Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= wrote or quoted: >>Me rocking Python? > >|to rock >|1. To use. To make do with, usually to great effect. >|"You don't need to make up the guest bed; we can rock the couch." > Urban Di

Bug in 3.12.5

2024-09-20 Thread Martin Nilsson via Python-list
Dear Sirs ! The attached program doesn’t work in 3.12.5, but in 3.9 it worked. Best Regards Martin Nilsson -- https://mail.python.org/mailman/listinfo/python-list

Old matplotlib animation now fails

2024-10-15 Thread Martin Schöön via Python-list
how to correct my code. Hence, this call for help. Any ideas? TIA /Martin -- https://mail.python.org/mailman/listinfo/python-list

Division-Bug in decimal and mpmath

2024-12-14 Thread Martin Ruppert via Python-list
esult, which is not a periodic decimal fraction with at most six digits. calc and dc provide as well an identical result, which *is* a periodic decimal fraction with six digits, so I think that's right. Below ist the python-script, with which the computation was done. Best regards Mart

<    39   40   41   42   43   44