ion of
suitable descriptors, then the interpreter will automatically take
care of populating the results of `dir()` correctly. However, if
you're genuinely dynamically adding attributes in `__getattr__`, then
you're going to need to add code to report them from `__dir__`
ute lookup code and the IMPORT_FROM opcode implementation,
rather than being able to isolate the changes to the import machinery
itself.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Pytho
ames like
"_fun_for_int" and "_fun_for_list" is *significantly* more informative
than seeing multiple distinct functions all called "_" or "__".
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
e as PEP 465's
matrix multiplication, but it's also not hard to be more compelling
than the limited set of examples I had previously collected :)
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-idea
the same pattern people use to call a base type's __getattr__ or
__getattribute__ for the subclass implementation of those methods,
just without multiple inheritance support (since calling super() from
C is painful).
Cheers,
Nick.
--
Nick Coghlan | ncogh...@
/* Add any additional attributes to the dir_result list */
return dir_result;
Fully supporting multiple inheritance is more work (as your link
shows), and often not needed.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
hecked that ImportError & AttributeError have
compatible binary layouts, so dual inheritance from them works :)
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://m
process of being
imported and raise a new CircularImportError that inherited from both
AttributeError and ImportError when that was the case.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Pytho
than using the generator expression
return len(list(iterable))
Cheers,
Nick.
P.S. itertools._grouper objects don't currently provide a length hint,
and it would be tricky to add one, since it would need to be based on
the number of remaining items in the original sequence, which would it
turn d
tem_count))
It's only encode that is currently missing a clear self-evidently
correct spelling, and I think that's more due to the lack of an
obvious spelling for "tell me how many items are in this iterable,
exhausting it if necessary" than it is to anything else.
Cheers,
Nick
itation that they're not there? Absolutely, at
least for me.
Cheers,
Nick.
P.S. Just clearly not irritating enough for me to actually put a patch
together and push for a final decision one way or the other regarding
adding them ;)
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
__
ted to fix the "random has no attribute
randint" problem, without any other side effects, we could potentially
special case __main__.__file__ in the import system such that we
always ignored it, even if it could technically satisfy the current
import request.
Che
ged all
the gaps.
Providing a separate binary with different defaults baked in at build
time doesn't magically fix everything (since you still need to change
shebang lines to refer to that binary), but it does make it much
easier to *stay* in system mode once you're there.
Cheers,
Nick.
--
Nick Cog
tion of their
names.
That said, all the potential counter-examples that come to mind are in
the documentation, but *not* in the corresponding docstrings (e.g. the
Euro symbol used in in the docs for chr() and ord()).
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com |
attribute
initialization" in https://docs.python.org/3/howto/index.html that
walked through from the basics of using read-only properties with
double-underscore prefixed result caching, through helper functions &
methods decorated with lru_cache, and all the way up to using
__class__ assignmen
t module as it expected - the developer of
such a script would have to write "from . import socket" in order to
reimport the main script as a module.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-
On 3 June 2017 at 22:24, Nick Coghlan <ncogh...@gmail.com> wrote:
> So while I'm definitely sympathetic to the use case (otherwise
> ExitStack wouldn't have a callback() method), "this would be useful"
> isn't a sufficient argument in this particular case - what's ne
doesn't allow for
Unicode identifiers in the first place.
https://github.com/python/peps/pull/285 is a PR to explicitly document
the standard library API restriction in the "Names to Avoid" part of
PEP 8.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
__
lanned to avoid being unduly disruptive.
It's entirely feasible at a technical level, though -
https://bugs.python.org/issue29929 describes one way to move away from
"import X" for __main__ relative imports and towards "from . import
X", which essentially involves turning __main__
nagement tool when that's what they
need, and to consider what could be done to help resolve that (with
adding a new kind of statement being just one of the options
evaluated).
Cheers,
Nick.
P.S. Nikolas Rauth has a more in-depth write-up of the utility of
ExitStack here:
https://www.rath.org/on-the
h the AST.
So a frontend that added "A @ B" support to Python 2.7 (for example),
would need to translate it into something like "numpy.dot(A, B)" or
"matmul(A, B)" at the Python AST level. It would then be up to that
function to emulate Python 3's __matmul__ specia
eration).
Matrix multiplication turned out to be a genuine expection, since all
the other binary operators had well defined meanings as
elementwise-operators, so borrowing one of them for matrix
multiplication meant losing access to the corresponding elementwise
operation, and there typically
PEP 432 is still a private API, although it
would require several more config settings to be migrated to the new
structure first).
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@pyth
constructor protocols suggest that this is
better characterised as an oversight in the design of the more recent
protocols, since neither PEP explicitly discusses the problem, both
PEPs were specifically designed to permit the use of objects that
*don't* inherit from the relevant builtin types (
On 27 May 2017 at 03:30, Guido van Rossum <gu...@python.org> wrote:
> On Fri, May 26, 2017 at 8:28 AM, Nick Coghlan <ncogh...@gmail.com> wrote:
>>
>> [...] assuming the rest of idea works out
>> well, we'd eventually like to move to a tiered model where the GIL
&
models that Python doesn't currently offer great
primitives to support (they're mainly a matter of using threads in
certain ways, which means they not only run afoul of the GIL, but you
also don't get any assistance from the interpreter in strictly
enforcing object ownership rules).
Cheers,
Nick
f software that folks run
directly under mod_wsgi isn't necessarily reflective of the full
extent of variation in the kinds of code that Python developers write
in general.
Cheers,
Nick.
[1] https://github.com/python/cpython/blob/master/Programs/_testembed.c#L41
--
Nick Coghlan | ncogh...
tructures as easy to work with as
database backed ones. For folks that *aren't* familiar with ORMs yet,
then declarative classes provide a potentially smoother learning
curve, since the "declarative class" aspects can be better separated
from the "object-relational mapping" aspec
an a normal runtime value. So a "type
variable" and a "type attribute" are also very different things
(assuming that the latter is being used as an equivalent to "class
attribute").
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
__
or some ideas on how something like attrs might be adapted to provide
better standard library tooling for more concise and readable class
definitions.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-i
rks in at least
3.5+:
>>> data = b'abcdefghijklmnop'
>>> data.hex()
'6162636465666768696a6b6c6d6e6f70'
>>> view = memoryview(data).cast('b', (4, 4))
>>> for row in view.tolist():
... print(' '.join(entry.hex() for entry
terators, similar to the way
itertools.groupby works (i.e. producing subiterators of variable
length rather than a fixed length tuple the way the grouper() recipe
in the docs does).
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
_
quot; has come up before, and it's conceivable
such an algorithm might find a home there.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
On 2 May 2017 at 21:31, Steven D'Aprano <st...@pearwood.info> wrote:
> On Mon, May 01, 2017 at 11:38:20PM +1000, Nick Coghlan wrote:
>> However, a much simpler alternative would be to just support two
>> keyword arguments to hex(): "delimiter" (as you suggest) and
&
ction never runs in the *current* thread, and instead always runs
in a different one.
One of the problems for the proposal is that we don't have the notion
of a "default executor", the way we do with the default event loop in
asyncio, so functions decorated with these would need to accept an
additiona
d
"chunk_size" (defaulting to 1, so you get per-byte chunking by
default)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/lis
rect, while all typecheckers (and human readers) would be able
to just believe the argument rather than having to run through all the
decorator transformations?
Make sense to me.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
__
rms (e.g in the
`types` module, or in the modules defining the relevant protocols), it
should be relatively straightforward to create mixin classes that use
__init_subclass__ to implicitly apply the explicit decorators.
The same doesn't hold the other way around - given a mixin, it's
tricky to conv
On 29 April 2017 at 03:00, Mike Miller <python-id...@mgmiller.net> wrote:
> On 2017-04-28 06:07, Nick Coghlan wrote:
>> For a *lot* of classes, what we want to be able to define is:
>>
>> - a set of data fields
>> - a basic initialiser to set those fields by name
library maintainers (in the same
way that most folks already delegate the behaviour of their
metaclasses), or else they can continue to write out all those
supported methods by hand if they really want or need the fine-grained
control.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com |
hink we should be considering the kinds of helpers we can
provide as class decorators to take the boilerplate and tedium out of
defining well-behaved classes.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ide
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
they *haven't* replicated the quirk described in
the OP, it's a solid data point suggesting there aren't a lot of major
projects relying on it.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailin
On 17 April 2017 at 08:00, Paul Moore <p.f.mo...@gmail.com> wrote:
> On 15 April 2017 at 10:45, Nick Coghlan <ncogh...@gmail.com> wrote:
>> So I'd be opposed to trying to make generator objects natively thread
>> aware - as Stephen notes, the GIL is an implementati
it can be used with
arbitrary iterators (not just generators), and can be more easily
generalised to other synchronisation models (such as multiprocessing).
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas
weak that
> we should simply treat it as a historical artifact.
+1 from me, with this rationale. The specifics sounds pretty good to
me, too - happy to review a PR if you put one together :)
Cheers,
Nick.
P.S. To be completely honest, I'd forgotten the dunder names in
operator were there :)
x.y), so adding such a reinterpretation would either move
the discrepancy to having "import x.y.z as m" work in cases where
"import x.y.z" fails, or else require adding a way for the compiler to
indicate that the resolved attribute must *also* exist in sys.modules,
in addition to being a
on par with that already
offered for peer module references.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
On 31 March 2017 at 15:12, Nick Coghlan <ncogh...@gmail.com> wrote:
> So *if* we were to add anything to the language here, it would be to
> add `itertools.repeat_call` as a new iteration primitive, since it
> isn't entirely straightforward to construct that operation out of
def repeat_call(callable, n):
for __ in range(n):
yield callable()
Cheers,
Nick.
P.S. The common problems shared by all of the `repeat_call`
formulations in this post are that they don't set __length_hint__
appropriately, and hence lose efficiency when using them to build
On 31 March 2017 at 04:08, Pavol Lisy <pavol.l...@gmail.com> wrote:
> On 3/30/17, Nick Coghlan <ncogh...@gmail.com> wrote:
>> On 31 March 2017 at 00:23, Pavol Lisy <pavol.l...@gmail.com> wrote:
>>> Just for curiosity - if PEP-501 will be accepted then how many t
strings and other sequences, InterpolationTemplate wouldn't
define a multiplication operator.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.or
the language needing to learn a special case syntax.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of
e inverse
of str.format)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
On 27 March 2017 at 13:10, Steve Dower <steve.do...@python.org> wrote:
> On 26Mar2017 0707, Nick Coghlan wrote:
>>
>> Perhaps it would be worth noting in the table of error handlers at
>> https://docs.python.org/3/library/codecs.html#error-handlers that
>> backs
On 26 March 2017 at 21:40, Pavel Velikhov <pavel.velik...@gmail.com> wrote:
> On 25 Mar 2017, at 19:40, Nick Coghlan <ncogh...@gmail.com> wrote:
>> Right, the target audience here *isn't* folks who already know how to
>> construct their own relational queries in S
ckslashreplace is used by the `ascii()` builtin and the associated
format specifiers, as well as noting the format specifiers in the
documentation of the builtin function?
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
he Python
grammar, which not only makes the query language difficult to update,
but also makes Python's base syntax harder for new users to learn.
By contrast, when DSLs are handled as interpolation templates with
delayed rendering, then the rendering function gets to provide runtime
documentation, and the
there would be
redirects back to the /en/ versions in place when there is no translation
for a particular version (e.g. the older security-fix only branches). I'm
not sure it matters all that much either way, but the PEP should be
explicit.
Cheers,
Nick.
--
Nick Coghlan | ncogh
minated by
> a break statement.
>
> The idea is certainly not new. In fact, Nick Coghlan, in his blog post
> http://python-notes.curiousefficiency.org/en/latest/python_
> concepts/break_else.html, uses it to provide a mental model for the
> meaning of the else following for/while, but, a
t, where the default step was defined
by the internal representation (i.e. it would increment by the smallest
possible value).
I'm not sure of any use cases outside exploring the behaviour of numerical
algorithm implementations in the presence of mathematical discontinuities,
though.
Cheers,
Nick.
replicate the separator
setting (and os.path module selection) logic that figures that out in
the first place.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https:
owever, even with that, I'm still only +0 on the idea - if folks
really want it, `types.new_class` can already be used to creatively to
address most of these things, and it's not exactly a problem that
comes up very often in practice.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane,
(Actually doing this may require elevating super and __class__ to true
keyword expressions, rather than the pseudo-keywords they are now)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-id
ions (and injecting the right __class__
cell reference for zero-argument super() support is a compelling
technical argument in favour of this feature over ordinary attribute
binding operations), but there's a lot more to the proposal than just
relaxing a syntact
ritten in JavaScript rather than C/C++, and the language
independent in-process bindings got fairly dramatically worse along
the way :)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-idea
quot;method modifiers" feature to Python 3:
https://frasertweedale.github.io/elk/modifiers.html
Cheers,
Nick.
P.S. I don't know of anyone actually using Elk in production, but it's
a good project to explore for anyone interested in more structured
approaches to managing method overrides
--
issue
trackers, but it shouldn't be any worse than what we see with
occasionally redirecting people to the Python Packaging Authority
issue trackers for various purposes.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
t's just a matter
of someone finding the time to poke at the docs build config and how
RTFD did it in order to see how to set that up, and then backporting
it to *all* the 3.x and 2.x branches that use Sphinx for their docs
(even the ones that are otherwise closed to updates).
Cheers,
Nick.
--
cm2() as b,
cm3() as c):
...
Relative to tuples-as-context-managers, such an approach would also
avoid reintroducing the old resource management problems that saw
contextlib.nested removed and replaced with contextlib.ExitStack.
ct ways that CPython
itself uses C structs (matching the heritage of the module's name),
even though the primary practical motivation and use case is common
over-the-wire protocols.
Cheers,
Nick.
P.S. "the reference interpreter does this" and "the standard library
does this&quo
anges should
likely be consolidated into that page, and the FAQ entry simplified
into a link to a new subsection on that page.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
hose unfortunate facts of computing at this point)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct:
tion
for the PEP 540 approach, I think it's the right way to go.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
d potentially even "Yes
exception, yes mojibake" in cases where the implicit ASCII-based
decoding could be encountered
PEP 538 would then be a follow-on PEP that attempts to resolve the
ASCII locale encoding problem not only for CPython itself, but also
for any other C/C++ components sharin
host (rather than exchanging UTF-8 encoded data
over a network connection), getting an exception is preferable to
silently corrupting the data stream
(I think I'll add something along those lines to PEP 538 as a new
"Core Design Principles" section)
Cheers,
Nick.
[1] https://docs.p
8
Version: $Revision$
Last-Modified: $Date$
Author: Nick Coghlan <ncogh...@gmail.com>
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 28-Dec-2016
Python-Version: 3.7
Abstract
An ongoing challenge with Python 3 on \*nix systems is the conflict between
needing to
posing a
"hash.from_iterable" callable that produces the same result as
"hash(tuple(iterable))" without actually creating the intermediate tuple.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ort property
>>
>> and toy with it that way.
>>
>> What module would be appropriate, though?
>>
>
> Well, DynamicClassAttribute is kept in the types module, so that's
> probably the place to put optionalproperty as well.
>
I'd also be OK with ju
all currently released versions of Python, not just
to 3.7+
2. It provides more scope for people to experiment with their own variants
of the idea before committing to a *particular* version somewhere in the
standard library
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane,
of C99 then I think that's the
> best approach.
>
I checked PEP 7 to see exactly which features we've added to the approved C
dialect, and designated initialisers are already on the list:
https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
So I believe that would allow the ini
think this kind of change may make a lot of sense as an RFE for pdb's
"where" command (with the added bonus that projects like pdbpp could make
it available to earlier Python versions as well).
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
_
sn't *really* present,
even though the property is defined at the class level
- the deprecation warning would indicate that the affected properties
should switch to using optionalproperty instead
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
his is one of the many cases where IDEs with some form of static
structural checking really do make development easier - the
"self.nonexisting" would be flagged as non-existent directly in the editor,
even before you attempted to run the code.
Cheers,
Nick.
--
Nick Coghlan | nco
On 21 December 2016 at 20:01, Erik Bray <erik.m.b...@gmail.com> wrote:
> On Wed, Dec 21, 2016 at 2:10 AM, Nick Coghlan <ncogh...@gmail.com> wrote:
> > Option 2: Similar to option 1, but using a custom type alias, rather than
> > using a C99 bool directly
>
nd PyThread_tss_delete
APIs to accept a "Py_ensure_t *init_flag" in addition to their current
arguments.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ontroversy, but rather as an easier to find reference for the design
rationale than a mailing list thread or a tracker issue.
(I'd also be happy to volunteer as BDFL-Delegate, since I'm already
reviewing the patch on the tracker)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com
r effect)
I don't see any obvious way around that either, as even using a small
struct for native pthread TLS keys would still face the problem of how to
initialise the pthread_key_t field.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Armed with those, the "give me all the attributes from __dir__"
command would be:
attrs = dict.from_attrs(obj, dir(obj))
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ide
motivated to implement it,
and we already have the logic to track which optional modules weren't
built in order to generate the message at the end of the build
process.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
On 5 December 2016 at 19:56, Tomas Orsava <tors...@redhat.com> wrote:
> On 12/03/2016 05:08 AM, Nick Coghlan wrote:
>>>
>>> Though I believe the default sys.excepthook function is currently written
>>> in
>>> C, so it wouldn't be very easy for dis
k
on empowering them *anyway*.
I just don't personally think that's feasible on a volunteer basis -
you need professional service providers that are familiar not only
with the specific concepts and technologies being taught, but also
with the bureaucratic context that the particular schools
s backing them up. But for cases like the
Australian Digital Curriculum, it makes sense for schools to look into
the local service providers rather than asking teachers to make do
with what they can download from the internet (while the latter option
is viable in some cases, it really does require
ms should be OK, though. While some veteran programmers may find
such prompts a bit condescending, they'd be better equipped than
beginners to opt in to alternative exception display options that omit
the hints.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
_
On 30 November 2016 at 04:33, Brett Cannon <br...@python.org> wrote:
> On Tue, 29 Nov 2016 at 06:49 Nick Coghlan <ncogh...@gmail.com> wrote:
>>
>> On 29 November 2016 at 20:54, Tomas Orsava <tors...@redhat.com> wrote:
>> > With a metapath hoo
lower to
fail, but that could be mitigated in various ways).
Specific applications could also implement their own missing module
handling by providing a __missing__.py file alongside their
__main__.py, and relying on directory and/or zipfile execution, or
else by monkeypatching the __missing__ module
anaged to be competitive performance-wise with the previous C
implementation, and faster when importing from a network filesystem :)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ide
er errors are uninformative because
the parser doesn't keep track of the state needed to generate nicer
messages), but it seems to typically be true for runtime errors where
we don't even report the type or representation of a misbehaving
value.
Cheers,
Nick.
--
Nick Cogh
the full extent of
Python's dynamic nature, as it can expect the user to be cooperating
with the tool to some degree, and "you're not cooperating" can be a
valid error to throw.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ked overrides
All an override marker would have to do to enable that introspection
is to set a particular attribute on the method definition.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Python-ideas mailing
401 - 500 of 592 matches
Mail list logo