-
-
Save moritz/766d05b4e6400a49db2166f09e80aea8 to your computer and use it in GitHub Desktop.
Perl 6's Inline::Python: trouble with named arguments, attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use Inline::Python; | |
use requests:from<Python>; | |
# works: | |
my $response = requests::get('https://irclog.perlgeek.de/'); | |
# fails: | |
# my $response = requests::get('https://irclog.perlgeek.de/', headers => { Accepts => 'application/json' }); | |
# Unexpected named argument 'headers' passed | |
# in sub at /home/moritz/p6/rakudo/install/share/perl6/site/sources/ED160F40E4F4A7D08FA4CD155799315ACDC59234 (Inline::Python) line 423 | |
# in block <unit> at inline.p6 line 9 | |
# fails: | |
say $response.text; | |
# 'unicode' object is not callable | |
# in method handle_python_exception at /home/moritz/p6/rakudo/install/share/perl6/site/sources/ED160F40E4F4A7D08FA4CD155799315ACDC59234 (Inline::Python) line 350 | |
# in method invoke at /home/moritz/p6/rakudo/install/share/perl6/site/sources/ED160F40E4F4A7D08FA4CD155799315ACDC59234 (Inline::Python) line 388 | |
# in block at /home/moritz/p6/rakudo/install/share/perl6/site/sources/ED160F40E4F4A7D08FA4CD155799315ACDC59234 (Inline::Python) line 586 | |
# in block <unit> at inline.p6 line 18 | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment