To clarify some more, you'd then have to use the decorator like:
@type_check_on_traceback
def three(arg: str) -> str:
return "{}({}) ".format(arg, len(arg))
on every function where you want this behaviour. Note that this will
also emit warnings on tracebacks of exceptions that are later
El 14/06/18 a las 14:37, Steven D'Aprano escribió:
> On Thu, Jun 14, 2018 at 01:03:37PM +0200, Daniel Sánchez Fábregas wrote:
>> My idea consist in:
>> Adding a method to perform type checking in traceback objects
>> When printing stack traces search for mistyped arguments and warn about
>> them
On 14 June 2018 at 12:03, Daniel Sánchez Fábregas <
daniel.sanchez.fabre...@xunta.gal> wrote:
> My idea consist in:
> Adding a method to perform type checking in traceback objects
> When printing stack traces search for mistyped arguments and warn about
> them to the user.
>
> Don't know if it is
On Thu, Jun 14, 2018 at 4:03 AM Daniel Sánchez Fábregas
wrote:
> My idea consist in:
> Adding a method to perform type checking in traceback objects
> When printing stack traces search for mistyped arguments and warn about
> them to the user.
>
Isn't it faster and far more reliable to run your
On Thu, Jun 14, 2018 at 01:03:37PM +0200, Daniel Sánchez Fábregas wrote:
> My idea consist in:
> Adding a method to perform type checking in traceback objects
> When printing stack traces search for mistyped arguments and warn about
> them to the user.
Can you give a concrete example of how this
My idea consist in:
Adding a method to perform type checking in traceback objects
When printing stack traces search for mistyped arguments and warn about
them to the user.
Don't know if it is in the roadmap, but seems that have a good
cost/benefit ratio to me.