- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 1,034 for Optional (0.11 seconds)
-
docs/ko/docs/advanced/advanced-python-types.md
`typing`에는 `None`이 될 수 있음을 선언하는 축약형으로 `Optional`도 있습니다. 아주 개인적인 관점에서의 팁입니다: - 🚨 `Optional[SomeType]` 사용은 피하세요 - 대신 ✨ **`Union[SomeType, None]`를 사용하세요** ✨. 둘은 동등하며 내부적으로도 같습니다. 하지만 단어 "optional"은 값이 선택 사항이라는 인상을 주는 반면, 실제 의미는 "값이 `None`이 될 수 있다"는 뜻입니다. 값이 선택 사항이 아니라 여전히 필수인 경우에도 그렇습니다. `Union[SomeType, None]`가 의미를 더 명확하게 드러낸다고 생각합니다. 이는 단지 단어와 명칭의 문제입니다. 하지만 이런 단어가 여러분과 팀원이 코드를 어떻게 생각하는지에 영향을 줄 수 있습니다. 예를 들어, 다음 함수를 보세요: ```python
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:57:01 GMT 2026 - 2.4K bytes - Click Count (0) -
api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java
*/ @Nonnull Optional<Path> rootDirectory(); /** * Returns the input stream for the Maven execution, if running in embedded mode. * * @return an {@link Optional} containing the input stream, or empty if not applicable */ @Nonnull default Optional<InputStream> stdIn() { return Optional.ofNullable(parserRequest().stdIn()); } /**Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Wed Jun 11 13:14:09 GMT 2025 - 6.7K bytes - Click Count (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java
@Nonnull @Override public Optional<Source> getInstallationSettingsSource() { return Optional.ofNullable(installationSettingsSource); } @Nonnull @Override public Optional<Source> getProjectSettingsSource() { return Optional.ofNullable(projectSettingsSource); } @NonnullCreated: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Feb 07 00:45:02 GMT 2025 - 9.4K bytes - Click Count (0) -
cmd/batch-replicate_test.go
source: type: minio # valid values are "s3" or "minio" bucket: mytest prefix: object-prefix1 # 'PREFIX' is optional # If your source is the 'local' alias specified to 'mc batch start', then the 'endpoint' and 'credentials' fields are optional and can be omitted # Either the 'source' or 'remote' *must* be the "local" deployment # endpoint: "http://127.0.0.1:9000"Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Thu Aug 01 12:53:30 GMT 2024 - 7.9K bytes - Click Count (0) -
apache-maven/src/assembly/maven/bin/mvnenc.cmd
@REM @REM JAVA_HOME (Optional) Points to a Java installation. @REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands. @REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending. @REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. @REM MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Oct 18 11:01:21 GMT 2024 - 1.7K bytes - Click Count (0) -
internal/config/etcd/help.go
Optional: true, Type: "path", Sensitive: true, }, config.HelpKV{ Key: ClientCertKey, Description: `client cert key for mTLS authentication` + defaultHelpPostfix(ClientCertKey), Optional: true, Type: "path", Sensitive: true, }, config.HelpKV{ Key: config.Comment, Description: config.DefaultComment, Optional: true,
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Wed Apr 27 03:11:37 GMT 2022 - 2.1K bytes - Click Count (0) -
docs/en/docs/tutorial/query-params.md
* `skip=20`: because you set it in the URL * `limit=10`: because that was the default value ## Optional parameters { #optional-parameters } The same way, you can declare optional query parameters, by setting their default to `None`: {* ../../docs_src/query_params/tutorial002_py310.py hl[7] *} In this case, the function parameter `q` will be optional, and will be `None` by default. /// checkCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/ComparatorsTest.java
public void testEmptiesFirst() { Optional<String> empty = Optional.empty(); Optional<String> abc = Optional.of("abc"); Optional<String> z = Optional.of("z"); Comparator<Optional<String>> comparator = emptiesFirst(comparing(String::length)); testComparator(comparator, empty, z, abc); // Just demonstrate that no explicit type parameter is required Comparator<Optional<String>> unused = emptiesFirst(naturalOrder());
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Apr 12 15:07:59 GMT 2025 - 6.4K bytes - Click Count (0) -
docs/ja/docs/advanced/advanced-python-types.md
- 代わりに ✨ **`Union[SomeType, None]` を使いましょう** ✨。 どちらも等価で内部的には同一ですが、「optional(任意)」という語が値が任意だと誤解させやすく、実際の意味は「`None` を取り得る」であり、任意ではなく依然として必須である場合でもそうです。そのため `Optional` より `Union` を勧めます。 `Union[SomeType, None]` の方が意味がより明確だと思います。 これは用語や名前付けの話に過ぎませんが、その言葉があなたやチームメイトのコードの捉え方に影響します。 例として次の関数を見てみましょう: ```python from typing import Optional def say_hi(name: Optional[str]): print(f"Hey {name}!") ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 2.4K bytes - Click Count (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt
// v1 == 0. .optional(defaultValue = 0), Adapters.INTEGER_AS_BIG_INTEGER, algorithmIdentifier, name, validity, name, subjectPublicKeyInfo, Adapters.BIT_STRING.withTag(tag = 1L).optional(), Adapters.BIT_STRING.withTag(tag = 2L).optional(), extension.asSequenceOf().withExplicitBox(tag = 3).optional(defaultValue = listOf()), decompose = {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 13.6K bytes - Click Count (0)