question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lancing of boolean default value in function header

See original GitHub issue

When trying to lance lancer itself I stumbled upon following output:

def snarl_Il11l1 (chirp_chirp_chirp_aααaa :Path ="./file.py",roar_αaaαa :bool =hoot_IIΙΙIΙ ):

which was generated from line 69 (nice) in src/lancer/entry.py:

def lance(file : Path = "./file.py", yolo : bool = False):

Here, the default value of the argument yolo=False was lanced which breaks the code.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
LeviBorodenkocommented, Dec 30, 2021

Lancing lancer! What an idea! This could be used for testing and maybe we should just have a lanced-master branch for giggles. Frankly, The way variable substitution is implemented is very much suboptimal. It relies on tokenize which is very limited. Back in the day I was not aware of the much better suited ast module.

While one could patch this issue. I believe that a fundamental rebuild is necessary to truly fix such issues in the long run.

0reactions
leloup314commented, Dec 30, 2021

Maybe this is also useful for people stumbling upon #5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default value of 'boolean' and 'Boolean' in Java - Stack Overflow
The default value for a Boolean (object) is null . The default value for a boolean (primitive) is false .
Read more >
Default parameters - JavaScript - MDN Web Docs
Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
Read more >
Defining default values for Boolean arguments in JavaScript
Is it usually recommended to define default values for Boolean arguments? I mean, is it usually recommended to define a function like this...
Read more >
Understanding Default Parameters in JavaScript - DigitalOcean
These allow developers to initialize a function with default values if the arguments are not supplied to the function call.
Read more >
Funktionskopf - Translation into English - examples German ...
To handle this we add a function head with our default arguments ... are attached immovably to the functional head (2) when located...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found