[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: let*: Wrong type argument: stringp, nil

From: Emanuel Berg
Subject: Re: let*: Wrong type argument: stringp, nil
Date: Wed, 29 Sep 2021 06:35:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hongyi Zhao wrote:

> (defun try/pyvenv-workon ()
>   (when (locate-dominating-file (buffer-file-name) ".python-version")
> ;
>       (let ((file (concat (locate-dominating-file (buffer-file-name)
> ".python-version") ".python-version")))
>            (pyvenv-workon (with-temp-buffer
>                            (insert-file-contents file)
>                              (nth 0 (split-string (buffer-string))))))))
> BTW, should I use `let' or `let*' here?

`let*' always works, `let' works when there is no references
to previous bindings in any binding...

So if it works and you have let, you have done the
right thing!

In theory, because of the independence of the individual
bindings with let, it can be used to compute in parallel - but
I don't think that actually happens - an urban legend ...

In your code you only have "file" so while both would work,
let* is unnecessary ...

underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]