Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #94949
| From | Marco Buttu <marco.buttu@gmail.com> |
|---|---|
| Date | 2015-08-03 16:54 +0200 |
| Subject | Re: how to determine for using c extension or not ? |
| References | <55BF0078.2030806@gmail.com> <CANc-5UzvJgQV9hnzNM2QJ2zNjbn94175sq0t3uQNMJHhSoqw3Q@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1196.1438618292.3674.python-list@python.org> (permalink) |
On 03/08/2015 15:30, Skip Montanaro wrote: > id() tells you nothing about the nature of the function. Use the > inspect.isbuiltin(): > ... > It's perhaps a bit poorly named, but "builtin" functions are those not > written in Python. That is, those written in C or C++. I think in the documentation there is an inconsistency about the term builtin. The "Built-in Functions" documentation says: """The Python interpreter has a number of functions and types built into it that are *always available*. They are listed here in alphabetical order""". https://docs.python.org/3/library/functions.html The functions in the documentation list, are the same functions we get from the `builtins` module. So, in the documentation we use the term built-in to indicate functions always available, whose names live in the builtin namespace. Sometimes, as mentioned by Skip, we say that the term "buit-in function" is also referred to a function written in C: https://docs.python.org/3/library/types.html#types.BuiltinFunctionType By using the same word (built-in) to indicate either objects written in C or objects who live in the builtin namespace could be a bit muddler. -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbuttu@oa-cagliari.inaf.it
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: how to determine for using c extension or not ? Marco Buttu <marco.buttu@gmail.com> - 2015-08-03 16:54 +0200
csiph-web