V
V
Vasily Chernenkov2018-12-30 13:23:54
Windows
Vasily Chernenkov, 2018-12-30 13:23:54

How to reset default options in python script?

I'm working with Python for the first time, I'm writing a plug-
in It has a dictionary with default data
While the script is running, the values ​​of the dictionary change
At some point, you need to return all the default values
​​As it turned out, dictionaries are mutable in Python (i.e. not assigned a value)

def = { 'name': False }
cfg = def
cfg['name'] = True
cfg = def
# cfg['name'] по прежнему будет True

How to solve such a problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artem @Jump, 2016-03-18
curated by the

What happened to windows?
You broke her.
Actually, where is my native windows8.1? And how to switch to it, if possible?
Boot from the win8.1 installation disk, select system restore and restore.
And in the windows boot manager for some reason now there is only one system: hyper-v
That's the way it should be. Hyper-v is a hypervisor. It doesn't install on windows, it runs on bare metal.
And windows runs on top of it.

A
Alexey, 2016-03-18
@skazi_premiere

I agree only with the first conclusion.
There is no installation disk on laptops with Windows 8.1, it goes on a separate section of the hard drive. If you know its model, then you can google the key combination to start the recovery mode (if the hypervisor was really installed as an OS, and not a separate role), there are recovery modes without repartitioning the disk with saving data. If you cannot boot recovery mode, you can make a bootable media, flash drive or disk (you need to know the edition of your OS otherwise it will not be activated, most likely you have "Windows 8.1 for one language"), official instructions from Microsoft(google like this "windows 8.1 media creation tool"). If you do not understand this issue, then it is better to contact a specialist, as data loss is possible.
In Windows 8-10 Pro, there is such a role called Hyper-V and it works as part of the system in exactly the same way as on servers, do not be misled.

M
MechanicZelenyy, 2018-12-30
@123581321345589

Copy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question