[issue18654] modernize mingwcygwin compiler classes

2015-04-19 Thread Václav Šmilauer
Václav Šmilauer added the comment: Ping? Roumen has been updaing the patch for one year and no reaction. Is there something which can be done? -- nosy: +eudoxos ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18654

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Doesn't always zeroes == length? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24000 ___ ___

[issue24005] Documentation Error: Extra line Break

2015-04-19 Thread Jaivish Kothari
Jaivish Kothari added the comment: Please find the attached patch for review. -- keywords: +patch resolution: - fixed Added file: http://bugs.python.org/file39118/doc_patch.patch ___ Python tracker rep...@bugs.python.org

[issue23999] Undefined behavior in dtoa.c (rshift 32 of 32bit data type)

2015-04-19 Thread Christian Heimes
Christian Heimes added the comment: You could be right. I didn't track all paths manually. All this bit shifting is making my head dizzy... :) Anyways I have sent you an invite for Coverity, so you can check the result yourself. The Python test suite passes with assert(k 32); inside the

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Dave Angel
On 04/19/2015 07:38 AM, BartC wrote: Perhaps you don't understand what I'm getting at. Suppose there were just two syntaxes: C-like and Python-like (we'll put aside for a minute the question of what format is used to store Python source code). Why shouldn't A configure his editor to

[issue23920] Should Clinic have nullable or types=NoneType?

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: p.s. I'm now leaning heavily towards renaming types to accept, and putting NoneType in the set passed to accept= instead of a separate parameter. -- ___ Python tracker rep...@bugs.python.org

[issue23999] Undefined behavior in dtoa.c (rshift 32 of 32bit data type)

2015-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, sorry; I see it. Fix on the way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23999 ___ ___

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Converters with encoding=True are not used in converted code. es is never used in still non-converted code and et is used only 6 times (for idna and utf-8 encodings) and can be replaced with custom converter or inlined code. So I think the support of

Re: New to Python - block grouping (spaces)

2015-04-19 Thread BartC
On 18/04/2015 03:22, Rustom Mody wrote: On Saturday, April 18, 2015 at 6:49:30 AM UTC+5:30, Dan Sommers wrote: On Fri, 17 Apr 2015 18:05:52 +0100, BartC wrote: (Actually *I* would quite like to know why languages don't have switchable syntax anyway to allow for people's personal preferences.)

[issue22980] C extension naming doesn't take bitness into account

2015-04-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 558335559383 by doko in branch 'default': - #22980: fix triplet configure test for more targets https://hg.python.org/cpython/rev/558335559383 -- ___ Python tracker rep...@bugs.python.org

[issue22980] C extension naming doesn't take bitness into account

2015-04-19 Thread Matthias Klose
Matthias Klose added the comment: I'm not trying to discredit any use cases, I just don't see them. so why do you see this on x86 for 32/64bit, but not for ARM soft-float/hard-float. The example given was pretty clear. All Linux distributions I know place the 32-bit and 64-bit versions of

Re: Best search algorithm to find condition within a range

2015-04-19 Thread Steven D'Aprano
On Sun, 19 Apr 2015 04:08 am, Albert van der Horst wrote: Fire up a lowlevel interpreter like Forth. (e.g. gforth) Yay! I'm not the only one who uses or likes Forth! Have you tried Factor? I'm wondering if it is worth looking at, as a more modern and less low-level version of Forth. --

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Mark Lawrence
On 19/04/2015 13:59, Ben Finney wrote: BartC b...@freeuk.com writes: Why shouldn't A configure his editor to display a Python program in C-like syntax, and B configure their editor to use Python-like tabbed syntax? I don't recall anyone saying that *shouldn't* be done. Feel free to make, and

[issue24002] Add un-parse function to ast

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Actually eval(ast) is all I need for #23967 too. But eval is a builtin, so it feels wrong to have it supporting--and therefore dependent on--ast. -- ___ Python tracker rep...@bugs.python.org

[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Sadly, for political reasons, it's best that we not convert collections, itertools, or random for now. I'll update this issue if the situation changes. Sorry about that! -- ___ Python tracker

[issue24002] Add un-parse function to ast

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think there is standard way to transform ast to bytecode and evaluate it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24002 ___

[issue23982] Tkinter in Python 3.4 for Windows incorrectly renders certain colors using non-TclTk RGB values

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think that we should document such minor details in Tkinter documentation. There are larger differences between Tcl/Tk versions that can make Python programs fail (e.g. introducing new internal Tcl/Tk type), and they are not documented. --

[issue24003] variable naming

2015-04-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug. while is a keyword, it is part of Python's syntax, and you are not permitted to use keywords as variable names. This is not an accident, but a deliberate decision. -- nosy: +steven.daprano resolution: - not a bug status: open -

[issue24005] Documentation Error: Extra line Break

2015-04-19 Thread Jaivish Kothari
New submission from Jaivish Kothari: https://docs.python.org/2/whatsnew/2.4.html?highlight=decorators#pep-318-decorators-for-functions-and-methods ''' def require_int (func): def wrapper (arg): assert isinstance(arg, int) return func(arg) return wrapper ''' New line is

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-04-19 Thread Stefan Behnel
Stefan Behnel added the comment: Here's a better patch that avoids exception normalisation in all normal cases. -- Added file: http://bugs.python.org/file39116/fix_stopiteration_crash.patch ___ Python tracker rep...@bugs.python.org

[issue23920] Should Clinic have nullable or types=NoneType?

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: I've posted about this to python-dev. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23920 ___ ___

[issue23999] Undefined behavior in dtoa.c (rshift 32 of 32bit data type)

2015-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: Looking more closely, the report doesn't make sense to me: `k` is the return value from a call to `lo0bits`. From the source of `lo0bits`, I don't see any way that `k` can be 32: it's always going to be in the range [0, 31]. Christian: do you have any more

[issue23999] Undefined behavior in dtoa.c (rshift 32 of 32bit data type)

2015-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: Okay, so after looking more closely, this *still* looks like a false positive: `lo0bits` *can* return 32, but only for an input of zero. In the code in question, we're doing `k = lo0bits(y)`, so the only way we can get a `k` of `32` is if `y = 0`. But the

[issue23999] Undefined behavior in dtoa.c (rshift 32 of 32bit data type)

2015-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: saw no output Bah; missed a bit. I saw no output when running the Python test suite, that is. That's not definitive, of course. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23999

[issue23982] Tkinter in Python 3.4 for Windows incorrectly renders certain colors using non-TclTk RGB values

2015-04-19 Thread Martin Falatic
Martin Falatic added the comment: No, I don't expect something like the color change to be documented here (unless that thing is incorrectly documented within python.org's current release trees). I do expect that just as python.org's OSX releases document the recommended version of TclTk to

Re: New to Python - block grouping (spaces)

2015-04-19 Thread BartC
On 18/04/2015 03:22, Ben Finney wrote: BartC b...@freeuk.com writes: (Actually *I* would quite like to know why languages don't have switchable syntax anyway to allow for people's personal preferences.) Which people's personal preferences? Are these the same people who have such passionate

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Sun, 19 Apr 2015 09:38 pm, BartC wrote: Suppose there were just two syntaxes: C-like and Python-like (we'll put aside for a minute the question of what format is used to store Python source code). Why shouldn't A configure his editor to display a Python program in C-like syntax, and B

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Sun, 19 Apr 2015 09:44 pm, BartC wrote: When I sometimes want to code in Python, why can't I used my usual syntax? When I go to China, why doesn't everyone speak English for my convenience? I'll tell you what. When you convince the makers of C compilers to support Python syntax as an

[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-19 Thread Martin Panter
Martin Panter added the comment: Sometimes the doc string for the overridden method does not make much sense in the context of the subclass. Just wondering if this was considered; it seems like a fairly serious downside to this new feature. E.g. in a package I am reviewing, there is a class

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Oh, heavens, yes, that's much nicer. Thanks for the suggestion, Serhiy! -- Added file: http://bugs.python.org/file39115/larry.one.more.clinic.format.unit.map.cleanup.2.txt ___ Python tracker rep...@bugs.python.org

[issue24003] variable naming

2015-04-19 Thread john kaiser
New submission from john kaiser: found error when naming variables with basic functions how to replicate while=123 #while should be treated as variable name while True: #this should be treated as a function print while #this should be as a variable name result: File C:\Users\_you

[issue24004] avoid explicit generator type check in asyncio

2015-04-19 Thread Stefan Behnel
New submission from Stefan Behnel: asyncio/coroutines.py contains this code: _COROUTINE_TYPES = (types.GeneratorType, CoroWrapper) def iscoroutine(obj): Return True if obj is a coroutine object. return isinstance(obj, _COROUTINE_TYPES) In other places, it uses inspect.isgenerator()

[issue24005] Documentation Error: Extra line Break

2015-04-19 Thread Georg Brandl
Georg Brandl added the comment: Why is this a bug? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24005 ___ ___ Python-bugs-list mailing list

[issue11587] METH_KEYWORDS alone gives METH_OLDARGS is no longer supported!

2015-04-19 Thread Antti Haapala
Antti Haapala added the comment: This is *still* there in Hg tip: PyCFunction_Call in Objects/methodobject.c does not have a case for `METH_KEYWORDS` only at all. The documentation for METH_KEYWORDS says that it is *typically* coupled with METH_VARARGS; however not having the case means that

[issue24002] Add un-parse function to ast

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For issue24001 you need rather eval(ast). But a function for stringifying ast would be useful in any case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24002

Re: sorting list by multiple criteria and grouping alphabetically in python

2015-04-19 Thread Chris Angelico
On Sat, Apr 18, 2015 at 5:56 PM, Ahamed Farook farookr...@gmail.com wrote: sorted(lsNearCities, key=operator.itemgetter(1,0)) This doesn't sort the list, it constructs a new one - and then promptly discards it. What you want is the .sort() method on the list object. As your code is incomplete, I

[issue23999] Undefined behavior in dtoa.c (rshift 32 of 32bit data type)

2015-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: I'm pretty sure that our code was based on something rather more recent than 2001: it was the most recent version available at the time (around 2008?), and it incorporates subsequent fixes from David Gay. Please don't replace our dtoa.c with a current

[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15582 ___ ___

[issue23982] Tkinter in Python 3.4 for Windows incorrectly renders certain colors using non-TclTk RGB values

2015-04-19 Thread Martin Falatic
Martin Falatic added the comment: Yes, the python.org releases specify the TclTK they should be used with, for OSX: https://www.python.org/download/mac/tcltk/ If there's another python.org bug report list let me know, but this still seems to be the right place. Since Python.org's windows

[issue23982] Tkinter in Python 3.4 for Windows incorrectly renders certain colors using non-TclTk RGB values

2015-04-19 Thread Martin Falatic
Martin Falatic added the comment: FYI, I've filed a bug with the TclTk people regarding their documentation. http://core.tcl.tk/tk/tktview/2a02881e4c23634022d0ae40a14383d9baad9eb9 -- ___ Python tracker rep...@bugs.python.org

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Ben Finney
BartC b...@freeuk.com writes: Why shouldn't A configure his editor to display a Python program in C-like syntax, and B configure their editor to use Python-like tabbed syntax? I don't recall anyone saying that *shouldn't* be done. Feel free to make, and maintain and support and propagate and

Alternative to curve_fit() from scipy.optimize

2015-04-19 Thread ddidussa
Hello, I am trying to fit a curve of the form (ln(x+a))**b to a set of points. However, curve_fit() from scipy.optimize fails to find a consistent optimal solution (as I increase the number of data points, the coefficients found vary greatly). I suspect this is because of the algorithm that

Re: New to Python - block grouping (spaces)

2015-04-19 Thread BartC
On 19/04/2015 13:59, Ben Finney wrote: BartC b...@freeuk.com writes: Why shouldn't A configure his editor to display a Python program in C-like syntax, and B configure their editor to use Python-like tabbed syntax? I don't recall anyone saying that *shouldn't* be done. Feel free to make, and

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: Just to be clear, I'm still -1 on any of this. On the one hand, there's a risk of backward-compatibility breakage (just as much a corner-case as the need expressed in this issue). On the other hand, I'd actually push for _PyObject_LookupSpecial to be fixed to

[issue12712] weave build_tools library identification

2015-04-19 Thread Mark Lawrence
Mark Lawrence added the comment: Is case sensitivity still an issue on Windows? I've tried searching but there are so many issues referring to case sensitivity that I got swamped. -- components: +Windows nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-19 Thread Cyd Haselton
Cyd Haselton added the comment: Ryan, Found the missing fix. In ./Programs/python.c #ifndef __ANDROID__ oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL)); if (!oldloc) { fprintf(stderr, out of memory\n); return 1; }

[issue24005] Documentation Error: Extra line Break

2015-04-19 Thread Berker Peksag
Berker Peksag added the comment: That document is 10 years old :) I don't think it's worth to change now. Also, what's new documents shouldn't be used as a tutorial. There are many tutorials about writing decorators on the internet. (Thanks for the report and the patch, Jaivish) --

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-19 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: On Sun, Apr 19, 2015 at 7:16 PM, Cyd Haselton rep...@bugs.python.org wrote: Cyd Haselton added the comment: Ryan, Found the missing fix. In ./Programs/python.c #ifndef __ANDROID__ oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL)); if

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-19 Thread Cyd Haselton
Cyd Haselton added the comment: Patch for python.c that prevents segfault on Android -- Added file: http://bugs.python.org/file39135/python.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Mel Wilson
On Sun, 19 Apr 2015 09:03:23 -0700, Rustom Mody wrote: Now if Thomson and Ritchie (yeah thems the guys) could do it in 1970, why cant we revamp this 45-year old archaic program=textfile system today? Dunno. Why not? There's half of you right there. --

[issue24005] Documentation Error: Extra line Break

2015-04-19 Thread Carol Willing
Carol Willing added the comment: janonymous, Thanks for the contribution. I agree with George that this is not a bug. The whitespace exists for developer readability and maintainability of code. Here's a section from PEP8 about the use of whitespace

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Doesn't always zeroes == length? zeroes requires length, but length does not require zeroes. As it happens all the format units supported by str always have both parameters either True or False. But the Py_UNICODE converter accepts length for format

[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks as this is a patch for different issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24001 ___ ___

[issue18654] modernize mingwcygwin compiler classes

2015-04-19 Thread R. David Murray
R. David Murray added the comment: Find someone from the packaging sig willing to review it, maybe? As in, get on that mailing list and ask. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18654

[issue23701] Drop extraneous comment from winreg.QueryValue's docstring

2015-04-19 Thread Claudiu Popa
Changes by Claudiu Popa pcmantic...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23701 ___ ___

[issue24003] variable naming

2015-04-19 Thread Ned Deily
Ned Deily added the comment: (... and is documented in The Python 3 and 2 Language Reference manuals: https://docs.python.org/3/reference/lexical_analysis.html#keywords and https://docs.python.org/2/reference/lexical_analysis.html#keywords) -- nosy: +ned.deily

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Chris Angelico
On Mon, Apr 20, 2015 at 4:07 AM, Dan Sommers d...@tombstonezero.net wrote: IMO, until git's successor tracks content-_not_-delimited-by-linefeeds, languages will continue to work that way. Linefeeds are nothing to git - it tracks the entire content of the file. When you ask to see the diff

Re: Best search algorithm to find condition within a range

2015-04-19 Thread Paul Rubin
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Have you tried Factor? I'm wondering if it is worth looking at, as a more modern and less low-level version of Forth. Factor is basically Lisp with Forth-based syntax, from what I can tell. Tagged objects, garbage collection, etc.

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Marko Rauhamaa
Michael Torrie torr...@gmail.com: On 04/18/2015 01:00 AM, Marko Rauhamaa wrote: It would be possible to define a canonical AST storage format. Then, your editor could incarnate the AST in the syntax of your choosing. As was just mentioned in another part of the thread, what you're

Re: HELP! How to return the returned value from a threaded function

2015-04-19 Thread D. Xenakis
This worked like a charm. http://code.activestate.com/recipes/84317-easy-threading-with-futures/ -- https://mail.python.org/mailman/listinfo/python-list

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: s/TypeError/RuntimeError/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23990 ___ ___ Python-bugs-list mailing

[issue8706] accept keyword arguments on most base type methods and builtins

2015-04-19 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- components: +Extension Modules, Interpreter Core nosy: +berker.peksag versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8706

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: Ionel Cristian Mărieș added the comment: #1. It's specified/documented, therefore it's intended The first thing a maintainer does is check the docs. This is a sensible thing to do - as you cannot have all the details in your hear. The main question at that

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-19 Thread Ryan Gonzalez
Changes by Ryan Gonzalez rym...@gmail.com: Added file: http://bugs.python.org/file39134/kbox_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___

[issue22619] Possible implementation of negative limit for traceback functions

2015-04-19 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: I'll do that tomorrow. The patch still needs a review though... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___

[issue23982] Tkinter in Python 3.4 for Windows incorrectly renders certain colors using non-TclTk RGB values

2015-04-19 Thread Martin Falatic
Martin Falatic added the comment: Thank you. Before going down the road of revising PEP 101 (which appears to be very non-trivial despite the simple (and certainly always present) data involved), I'd like to know: is version information about the pre-compiled Windows binaries (of which this

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23990 ___

[issue24007] Write PyArg_Parse* format in a line with a function

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: I don't care about this, but the patch looks fine. If this really helps then LGTM. Please hold off checking this in until after 3.5.0 alpha 4 is released. -- ___ Python tracker rep...@bugs.python.org

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: What would be the right thing? My suggestion of using a metaclass is actually not effective here because __call__ has meaning for metaclasses. Otherwise you could have made __call__ more dynamic via a metaclass. Except that is another reason why my suggestion

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: I want to address the four main points of criticism in fixing this issue, just in case it's not clear why I think those lines of thought are wrong: #1. It's specified/documented, therefore it's intended The first thing a maintainer does is check the

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Ron Adam
On 04/19/2015 05:42 PM, BartC wrote: So I'm aware of some of the things that are involved. (BTW that project worked reasonably well, but I decided to go in a different direction: turning J from a mere syntax into an actual language of its own.) Something you might try with your new

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Ben Finney
BartC b...@freeuk.com writes: I used actual languages Python and C in my example, I should have used A and B or something. If you had, then the topic drifts so far from being relevant to a Python programming forum that I'd ask you to stop. Perhaps that should have happened much sooner. --

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: Note that (in my mind, unfortunately) the pickle module looks up several dunder methods on instances. That isn't quite the same thing since the issue is about callable not triggering the descriptor protocol. However it is closely related. I point this out because

[issue23967] Make inspect.signature expression evaluation more powerful

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Whoops. Here's the revised patch. -- Added file: http://bugs.python.org/file39123/larry.improved.signature.expressions.2.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23967

[issue23967] Make inspect.signature expression evaluation more powerful

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Thanks to #24002 I now know how to write evalify_node properly. This patch is now much better. Note that I deliberately made the new function _eval_ast_expr() as a private module-level routine. I need that same functionality in Argument Clinic too, so if

Re: Best search algorithm to find condition within a range

2015-04-19 Thread Dave Angel
On 04/19/2015 09:02 AM, Steven D'Aprano wrote: On Sun, 19 Apr 2015 04:08 am, Albert van der Horst wrote: Fire up a lowlevel interpreter like Forth. (e.g. gforth) Yay! I'm not the only one who uses or likes Forth! Have you tried Factor? I'm wondering if it is worth looking at, as a more

[issue24008] inspect.getsource is failing for sys.excepthook

2015-04-19 Thread Anand Reddy Pandikunta
New submission from Anand Reddy Pandikunta: inspect.getsource(sys.excepthook) Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python2.7/inspect.py, line 701, in getsource lines, lnum = getsourcelines(object) File

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: u# and Z# allow null characters. Not according to the documentation. 'u' explicitly says it does not allow NUL characters. 'Z', 'u#', and 'Z#' all say they are variants of 'u' but never mention that they might allow NUL characters. --

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Ethan Furman
Ethan Furman added the comment: The right thing, using a meta-class, is to have the meta-class check if the proxied object is callable, and if so, put in the __call__ function in the class that is being created. -- ___ Python tracker

[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Here's the right patch. -- Added file: http://bugs.python.org/file39128/larry.clinic.use.raw.types.2.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24001

[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: Removed file: http://bugs.python.org/file39122/larry.one.more.clinic.format.unit.map.cleanup.2.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24001

[issue24011] Add error checks to PyInit_signal()

2015-04-19 Thread Christian Heimes
New submission from Christian Heimes: The init function of the signal module fails to check for errors in a couple of places. The patch replaces PyDict_SetItemString() calls with PyModule_AddIntMacro() and error checks. An exception is unlikely so I'm OK when the patch just lands in 3.4 and

[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Whoops. I'll fix that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24001 ___ ___ Python-bugs-list mailing

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: This bug report seems to be completely based on a false premise. In the very first message of this issue, Ionel says: it return True even if __call__ is actually an descriptor that raise AttributeError (clearly not callable at all). but that is wrong. It

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not according to the documentation. 'u' explicitly says it does not allow NUL characters. 'Z', 'u#', and 'Z#' all say they are variants of 'u' but never mention that they might allow NUL characters. I understand the note in u description as explicitly

[issue22080] Add windows_helper module helper

2015-04-19 Thread Claudiu Popa
Claudiu Popa added the comment: The latest patch drops the symlink check, since it can be added later. -- Added file: http://bugs.python.org/file39133/issue22080_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22080

Re: Python and fortran Interface suggestion

2015-04-19 Thread Dave Angel
On 04/19/2015 11:56 AM, pauld11718 wrote: I shall provide with further details Its about Mathematical modelling of a system. Fortran does one part and python does the other part (which I am suppose to provide). For a time interval tn -- t_n+1, fortran code generates some values, for which

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Doesn't always zeroes == length? zeroes requires length, but length does not require zeroes. As it happens all the format units supported by str always have both parameters either True or False. But the Py_UNICODE converter accepts length for format units

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Sun, 19 Apr 2015 09:38 pm, BartC wrote: (I think much of the problem that most languages are intimately associated with their specific syntax, so that people can't see past it to what the code is actually saying. a=b, a:=b, b=a, (setf a b), whatever the syntax is, who cares? We just want

[issue23275] Can assign [] = (), but not () = []

2015-04-19 Thread R. David Murray
R. David Murray added the comment: There is also no reason to break currently working code, which turning this into a syntax error would od. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23275

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I disagree. My goal with Argument Clinic is that third-party developers will use it to write extensions. And we don't know how many extension modules are using es, es#, et, et#, s#, y#, z#, u#, and U#. I don't think we can remove any of this

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Mel Wilson
On Mon, 20 Apr 2015 03:53:08 +1000, Steven D'Aprano wrote: On Mon, 20 Apr 2015 02:03 am, Rustom Mody wrote: Well evidently some people did but fortunately their managers did not interfere. You are assuming they had managers. University life isn't exactly the same as corporate culture.

[issue24007] Write PyArg_Parse* format in a line with a function

2015-04-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes Argument Clinic to output format argument of PyArg_Parse, PyArg_ParseTuple and PyArg_ParseTupleAndKeywords in a line with a function itself. First, this makes generated code more compact and easier to read and compare with old code.

[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: Thanks to #24002 I now know how to write evalify_node properly. This revision of the patch is much better, and maybe ready for checkin. -- Added file: http://bugs.python.org/file39122/larry.one.more.clinic.format.unit.map.cleanup.2.txt

[issue24003] variable naming

2015-04-19 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24003 ___ ___ Python-bugs-list

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-19 Thread Larry Hastings
Larry Hastings added the comment: New diff based on Serhiy's latest round of comments. Thanks, Serhiy! You are inexhaustable! -- Added file: http://bugs.python.org/file39125/larry.one.more.clinic.format.unit.map.cleanup.3.txt ___ Python tracker

[issue23994] argparse fails to detect program name when there is a slash at the end of the program's path

2015-04-19 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch. We'll want a unit test for the behavior before committing this. -- nosy: +r.david.murray stage: - test needed versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-04-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There are a lot of format units supported in PyArg_Parse* functions, but some of them are rarely or never used in current CPython code. Some of format units are legacy from Python 2 and are not needed in modern Python 3 code or can be replaced with custom

[issue24006] Multiprocessing fails when using functions defined in interactive interpreter.

2015-04-19 Thread R. David Murray
R. David Murray added the comment: I'm guessing you are on Windows. Please read https://docs.python.org/2/library/multiprocessing.html#windows. You can't do what you show on windows (though you can on unix, since it uses fork). -- nosy: +r.david.murray resolution: - not a bug

[issue24010] Add error checks to PyInit__locale()

2015-04-19 Thread Christian Heimes
New submission from Christian Heimes: The init function of the locale module fails to check for errors in a couple of places. The patch replaces PyDict_SetItemString() calls with PyModule_AddIntMacro() and error checks. An exception is unlikely so I'm OK when the patch just lands in 3.4 and

  1   2   >