[issue27659] Prohibit implicit C function declarations

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +946 ___ Python tracker ___ ___

[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9a26d20d2baa27407501b13435d733dcc26f3d53 by Victor Stinner in branch 'master': Prohibit implicit C function declarations https://github.com/python/cpython/commit/9a26d20d2baa27407501b13435d733dcc26f3d53

[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread STINNER Victor
STINNER Victor added the comment: Oh by the way, if someone sees a build error because of a missing function declaration, please report a new issue. -- ___ Python tracker

[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: > If yes, can we close the issue? Yes and thanks! As a side note, on Android it prevents broken grp.cpython-37m.so, too. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread STINNER Victor
STINNER Victor added the comment: Martin Panter: "If there is an obscure platform where we don’t include the right header file for a function, changing the warning into an error would cause the build to fail." In my experience, calling a function which was not declared is very likely to

[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca2f024ce7cb by Victor Stinner in branch 'default': Prohibit implicit C function declarations https://hg.python.org/cpython/rev/ca2f024ce7cb -- nosy: +python-dev ___ Python tracker <

[issue27659] Prohibit implicit C function declarations

2017-02-02 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Hello, any updates here? I hope this merged soon so that potential issues on obscure platforms can be fixed as soon as possible. -- ___ Python tracker

[issue27659] Prohibit implicit C function declarations

2017-01-16 Thread Martin Panter
Martin Panter added the comment: I would say it is more important to fit in with the surrounding style than mindlessly follow PEP 7. IMO the indentation in the configure script is a mess, but if we fix it up, it should probably be done separately to adding this extra flag. --

[issue27659] Prohibit implicit C function declarations

2017-01-16 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Thanks for the comment and sorry for the mistake. Here's another updated patch. In PEP7: > Use 4-space indents and no tabs at all. Does that apply to configuration files, too? -- Added file:

[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: > Would it be possible to not add this option for third party extensions? Good suggestion. Just use $CFLAGS_NODIST instead of $BASECFLAGS. -- Added file: http://bugs.python.org/file46036/prohibit-implicit-function-declarations.patch

[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to not add this option for third party extensions? -- ___ Python tracker ___

[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread Chi Hsuan Yen
for the existence of crypt() -> Prohibit implicit C function declarations type: compile error -> enhancement Added file: http://bugs.python.org/file46033/prohibit-implicit-function-declarations.patch ___ Python tracker <rep...@bugs.python.o

Re: Binding was Re: Function declarations ?

2011-06-14 Thread Ethan Furman
Patty wrote: So I am wondering if you learned this in Computer Science or Computer Engineering?, on the job? I learned it on this list. :) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Binding was Re: Function declarations ?

2011-06-14 Thread Patty
- Original Message - From: Ethan Furman et...@stoneleaf.us To: python-list@python.org Sent: Monday, June 13, 2011 10:55 PM Subject: Re: Binding was Re: Function declarations ? Patty wrote: So I am wondering if you learned this in Computer Science or Computer Engineering

Re: Function declarations ?

2011-06-13 Thread Steven D'Aprano
. Languages with variable and function declarations usually use hoisted environment. Hoisted ? With a pulley and a cable ? No, with a compiler. Hoisting in computing refers to the idea of lifting variables or code outside of one block into another. For example, an optimization technique is to hoist

Re: Function declarations ?

2011-06-13 Thread John Nagle
with variable and function declarations usually use hoisted environment. Hoisted ? With a pulley and a cable ? There are languages with definitions and in which the compiler looks ahead. FORTRAN, for example. Python doesn't work that way. Nor do C and the languages derived from it, because the syntax

Re: Function declarations ?

2011-06-13 Thread Gregory Ewing
Steven D'Aprano wrote: Hoisting in computing refers to the idea of lifting variables or code outside of one block into another. I'm not sure it's the right term for what's happening here, though. Nothing is being lifted to a higher level -- the functions remain at the same level they were

Re: Function declarations ?

2011-06-13 Thread Gregory Ewing
Tim Roberts wrote: Andre Majorel che...@halliburton.com wrote: Anyway, it seems the Python way to declare a function is def f (): pass No, that DEFINES a function. Actually, it's more illuminating to say that it *creates* a function. The 'def' statement in Python is an executable

Binding was Re: Function declarations ?

2011-06-13 Thread Patty
Gregory Ewing greg.ew...@canterbury.ac.nz wrote in message news:95ntrifod...@mid.individual.net... Tim Roberts wrote: Andre Majorel che...@halliburton.com wrote: Anyway, it seems the Python way to declare a function is def f (): pass No, that DEFINES a function. Actually, it's

Re: Function declarations ?

2011-06-12 Thread Andre Majorel
On 2011-06-10, Asen Bozhilov asen.bozhi...@gmail.com wrote: Andre Majorel wrote: Is there a way to keep the definitions of the high-level functions at the top of the source ? I don't see a way to declare a function in Python. Languages with variable and function declarations usually use

Re: Function declarations ?

2011-06-12 Thread Tim Roberts
Andre Majorel che...@halliburton.com wrote: Anyway, it seems the Python way to declare a function is def f (): pass No, that DEFINES a function. There is no way to declare a function in Python. It isn't done, because it isn't necessary. That code doesn't do what you think it does.

Re: Function declarations ?

2011-06-10 Thread Asen Bozhilov
and function declarations usually use hoisted environment. JavaScript is the perfect example. Hoisted environment allows you to use call expression before the physical declaration of the function in the source text. e.g. foo(); function foo() {} This code does not throw ReferenceError

Function declarations ?

2011-06-08 Thread Andre Majorel
Is there a way to keep the definitions of the high-level functions at the top of the source ? I don't see a way to declare a function in Python. Thanks in advance. -- André Majorel http://www.teaser.fr/~amajorel/ J'ai des droits. Les autres ont des devoirs. --

Re: Function declarations ?

2011-06-08 Thread Calvin Spealman
Just write the function, at the top of the source. Easy peasy. On Wed, Jun 8, 2011 at 9:58 AM, Andre Majorel che...@halliburton.com wrote: Is there a way to keep the definitions of the high-level functions at the top of the source ? I don't see a way to declare a function in Python. Thanks

Re: Function declarations ?

2011-06-08 Thread D'Arcy J.M. Cain
On Wed, 8 Jun 2011 13:58:18 + (UTC) Andre Majorel che...@halliburton.com wrote: Is there a way to keep the definitions of the high-level functions at the top of the source ? I don't see a way to declare a function in Python. You don't declare functions in Python. You simply define them.