Search Options

Results per page
Sort
Preferred Languages
Advance

Results 471 - 480 of 1,184 for asdict (0.05 sec)

  1. guava-tests/test/com/google/common/hash/HashTestUtils.java

            int key1 = rand.nextInt();
            // flip input bit for key2
            int key2 = key1 ^ (1 << i);
            // get hashes
            int hash1 = function.hashInt(key1).asInt();
            int hash2 = function.hashInt(key2).asInt();
            // test whether the hash values have same output bits
            same |= ~(hash1 ^ hash2);
            // test whether the hash values have different output bits
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/extra-models.md

    #### 用其它模型中的内容生成 Pydantic 模型
    
    上例中 ,从 `user_in.dict()` 中得到了 `user_dict`,下面的代码:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    等效于:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ……因为 `user_in.dict()` 是字典,在传递给 `UserInDB` 时,把 `**` 加在  `user_in.dict()` 前,可以让 Python 进行**解包**。
    
    这样,就可以用其它 Pydantic 模型中的数据生成 Pydantic 模型。
    
    #### 解包 `dict` 和更多关键字
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/extra-models.md

    #### Pydantic-модель из содержимого другой модели
    
    Как в примере выше мы получили `user_dict` из `user_in.dict()`, этот код:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    будет равнозначен такому:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ...потому что `user_in.dict()` - это `dict`, и затем мы указываем, чтобы Python его "распаковал", когда передаём его в `UserInDB` и ставим перед ним `**`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/extra-models.md

    Como no exemplo acima, obtivemos o `user_dict` a partir do `user_in.dict()`, este código:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    seria equivalente a:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ...porque `user_in.dict()` é um `dict`, e depois fazemos o Python "desembrulhá-lo" passando-o para UserInDB precedido por `**`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. impl/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java

    /**
     */
    public class ExclusionSetFilter implements ArtifactFilter {
        private Set<String> excludes;
    
        public ExclusionSetFilter(String[] excludes) {
            this.excludes = new LinkedHashSet<>(Arrays.asList(excludes));
        }
    
        public ExclusionSetFilter(Set<String> excludes) {
            this.excludes = excludes;
        }
    
        public boolean include(Artifact artifact) {
            String id = artifact.getArtifactId();
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  6. compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/scopes/Maven4ScopeManagerConfiguration.java

            return false;
        }
    
        @Override
        public BuildScopeSource getBuildScopeSource() {
            return new BuildScopeMatrixSource(
                    Arrays.asList(CommonBuilds.PROJECT_PATH_MAIN, CommonBuilds.PROJECT_PATH_TEST),
                    Arrays.asList(CommonBuilds.BUILD_PATH_COMPILE, CommonBuilds.BUILD_PATH_RUNTIME));
        }
    
        @Override
        public Collection<org.eclipse.aether.scope.DependencyScope> buildDependencyScopes(
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/SortedMultisetTestSuiteBuilder.java

    import static com.google.common.collect.testing.features.CollectionFeature.SERIALIZABLE;
    import static com.google.common.collect.testing.features.CollectionFeature.SERIALIZABLE_INCLUDING_VIEWS;
    import static java.util.Arrays.asList;
    import static java.util.Collections.emptySet;
    import static java.util.Collections.sort;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.collect.BoundType;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java

    import static com.google.common.collect.testing.Helpers.getMethod;
    import static com.google.common.collect.testing.features.FeatureUtil.addImpliedFeatures;
    import static java.util.Arrays.asList;
    import static java.util.Collections.disjoint;
    import static java.util.Collections.unmodifiableSet;
    import static java.util.logging.Level.FINER;
    
    import com.google.common.annotations.GwtIncompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/DenseImmutableTable.java

      }
    
      @Override
      Cell<R, C, V> getCell(int index) {
        int rowIndex = cellRowIndices[index];
        int columnIndex = cellColumnIndices[index];
        R rowKey = rowKeySet().asList().get(rowIndex);
        C columnKey = columnKeySet().asList().get(columnIndex);
        // requireNonNull is safe because we use indexes that were populated by the constructor.
        V value = requireNonNull(values[rowIndex][columnIndex]);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static java.util.Arrays.asList;
    
    import com.google.common.base.Function;
    import com.google.common.collect.testing.SafeTreeSet;
    import com.google.common.collect.testing.SetTestSuiteBuilder;
    import com.google.common.collect.testing.TestStringSetGenerator;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.9K bytes
    - Viewed (0)
Back to top