列表理解不适用于生成器

时间:2018-12-07 03:31:08

标签: python-3.x list-comprehension

我正在使用列表推导来获取生成器生成的每个字典中键的值计数,但是我不确定是否使用了正确的语法,因为我得到了0个结果:

at org.testng.internal.Graph.topologicalSort(Graph.java:149)
at org.testng.internal.MethodHelper.topologicalSort(MethodHelper.java:261)
at org.testng.internal.MethodHelper.sortMethods(MethodHelper.java:317)
at org.testng.internal.MethodHelper.collectAndOrderMethods(MethodHelper.java:64)
at org.testng.TestRunner.initMethods(TestRunner.java:438)
at org.testng.TestRunner.init(TestRunner.java:271)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.<init>(TestRunner.java:192)
at org.testng.remote.support.RemoteTestNG6_12$1.newTestRunner(RemoteTestNG6_12.java:33)
at org.testng.remote.support.RemoteTestNG6_12$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_12.java:66)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:713)
at org.testng.SuiteRunner.init(SuiteRunner.java:260)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:198)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1295)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1273)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1128)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

我确定此生成器中的词典具有这些值。

0 个答案:

没有答案