Skip to main content
Module

x/denops_std/function/mod.ts>py3eval

📚 Standard module for denops.vim
Go to Latest
function py3eval
import { py3eval } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Evaluate Python expression {expr} and return its result converted to Vim data structures. Numbers and strings are returned as they are (strings are copied though, Unicode strings are additionally converted to 'encoding'). Lists are represented as Vim List type. Dictionaries are represented as Vim Dictionary type with keys converted to strings. Note that in a :def function local variables are not visible to {expr}.

Can also be used as a method:

GetExpr()->py3eval()

only available when compiled with the +python3 feature

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>