有一个python列表
[('schema1', 'table1', 'column_name1'), ('schema1', 'table1', 'column_name2'), ('schema1', 'table2', 'column_name3'), ('schema2', 'table3', 'column_name4')]
Run Code Online (Sandbox Code Playgroud)
我需要将它转换为具有以下结构的python dict
schema1:
table1:
(column_name1,
column_name2)
table2:
(column_name3)
schema2:
table3:
(column_name4)
Run Code Online (Sandbox Code Playgroud)
有没有有效的转换方式?
在运行 docker-compose up 时,我停留在 Dockerfile 上,该文件抛出无法验证签名的错误。
下一个 RUN 行抛出错误
...
RUN apt-key adv --fetch-keys https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc \
&& echo "deb http://apt.postgresql.org/pub/repos/apt bionic-pgdg main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y install libpq-dev=13.* \
&& apt-get -y install python3.8-dev
...
Run Code Online (Sandbox Code Playgroud)
这会引发下一个错误
> [4/6] RUN apt-key adv --fetch-keys https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc && echo "deb http://apt.postgresql.org/pub/repos/apt bionic-pgdg main" >> /etc/apt/sources.list && apt-get update && apt-get -y install libpq-dev=13.* && apt-get -y install python3.8-dev:
#7 0.343 Warning: apt-key output should not be parsed (stdout …Run Code Online (Sandbox Code Playgroud)