我对Python 2.7中的try异常用法感到困惑。
try:
raise valueError("sample value error")
except Exception as e:
print str(e)
try:
raise valueError("sample value error")
except Exception,exception:
print str(exception)
try:
raise valueError("sample value error")
except exception:
print str(exception)
try:
raise valueError("sample value error")
except Exception:
print str(Exception) # it prints only the object reference
Run Code Online (Sandbox Code Playgroud)
可以帮助我理解上述用法吗?
在Kubernetes中,POD被视为单个部署单元,可能具有一个或多个容器,因此如果我们缩放POD中的所有容器,则将分别缩放。
如果POD只有一个容器,则更容易缩放特定的POD,那么在POD内包装一个或多个容器的目的是什么?