假||假返回真

时间:2020-07-11 03:17:58

标签: flutter dart

(idController.text.isEmpty ||passwordController.text.isEmpty)
? () => {} : 
() => {infoList[idController.text] = passwordController.text,
print(infoList[idController.text])}

我发现idController.text.isEmptypasswordController.text.isEmpty都是假的,因此结果应该是假的并且要打印文本,但是它什么都不做-表示结果为真。我找不到问题。

1 个答案:

答案 0 :(得分:0)

当你做这样的事情

def expanding(data,cols):

    copy_df = data.copy(deep=True)
    for i in range(len(copy_df)):
       if i==0:
          copy_df.loc[i,cols]=0
       else:
          op = group_processor(data[:i+1],cols,i)
          copy_df.loc[i,cols]=op
    return copy_df

def group_processor(cut_df,cols,i):

    op=[]
    for each_col in cols:
       temp = cut_df.pivot_table("c",[each_col]).rank(method="dense")-1
       value = cut_df.loc[i,each_col]
       temp = temp.reset_index()
       final_value = temp.loc[temp[each_col]==value,"c"]
       op.append(final_value.values[0])

    return op

expanding(df,["d1"])

Rikus Honey没有接收到任何这些函数的执行结果,而是在接收函数本身。您没有执行它们,因此预期c++17无法运行。

您的代码可能过于简化了您要执行的操作。如果从字面上看,您不需要三元运算符。

   struct Foo 
    {
        std::tuple<int, float, bool> tpl_;
    };

template <class...Ts>
void test( Ts... ) {}

int main()
{
    Foo f;
    
    std::apply( []( auto&&...args ) { test( args... ); }, f.tpl_ );

}