Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug with unset variables



On Wed, Nov 18, 2020 at 4:45 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:

> Do not argue about a person.  Argue about the technical matter at hand.

That's what I did. The technical matter was being ignored.

> What are A and B?

I already explained this multiple times:

A: unset foo
B: foo = nil

> Why does the Python example not use «del» as the "unset" operation?

Because it doesn't do the same thing as unset.

In shell, this leaves foo declared in a local scope:

  local foo # declare
  unset foo # unset

In Python, this doesn't:

  foo = None # declare
  del foo # undeclare

They are *not* functionally the same thing.

Cheers.

-- 
Felipe Contreras




Messages sorted by: Reverse Date, Date, Thread, Author