| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2233,13 +2233,13 @@ msgstr "" | |||
| 2233 | 2233 | ||
| 2234 | 2234 | #: ../Doc/faq/programming.rst:1706 | |
| 2235 | 2235 | msgid "When can I rely on identity tests with the *is* operator?" | |
| 2236 | - msgstr "" | ||
| 2236 | + msgstr "*is* 연산자를 사용한 아이덴티티 검사는 언제 신뢰할 수 있습니까?" | ||
| 2237 | 2237 | ||
| 2238 | 2238 | #: ../Doc/faq/programming.rst:1708 | |
| 2239 | 2239 | msgid "" | |
| 2240 | 2240 | "The ``is`` operator tests for object identity. The test ``a is b`` is " | |
| 2241 | 2241 | "equivalent to ``id(a) == id(b)``." | |
| 2242 | - msgstr "" | ||
| 2242 | + msgstr "``is`` 연산자는 객체 아이덴티티를 검사합니다. 검사 ``a is b``\\는 ``id(a) == id(b)``\\와 동등합니다." | ||
| 2243 | 2243 | ||
| 2244 | 2244 | #: ../Doc/faq/programming.rst:1711 | |
| 2245 | 2245 | msgid "" | |
@@ -2249,33 +2249,44 @@ msgid "" | |||
| 2249 | 2249 | "tests, identity tests are guaranteed to return a boolean ``True`` or " | |
| 2250 | 2250 | "``False``." | |
| 2251 | 2251 | msgstr "" | |
| 2252 | + "아이덴티티 검사의 가장 중요한 속성은 객체가 항상 자신과 동일하고 ``a is a``\\는 항상 ``True``\\를 반환한다는 " | ||
| 2253 | + "것입니다. 아이덴티티 검사는 일반적으로 동등성 검사보다 빠릅니다. 동등성 검사와 달리, 아이덴티티 테스트는 불리언 " | ||
| 2254 | + "``True``\\나 ``False``\\를 반환함이 보장됩니다." | ||
| 2252 | 2255 | ||
| 2253 | 2256 | #: ../Doc/faq/programming.rst:1716 | |
| 2254 | 2257 | msgid "" | |
| 2255 | 2258 | "However, identity tests can *only* be substituted for equality tests when" | |
| 2256 | 2259 | " object identity is assured. Generally, there are three circumstances " | |
| 2257 | 2260 | "where identity is guaranteed:" | |
| 2258 | 2261 | msgstr "" | |
| 2262 | + "그러나, 객체 아이덴티티가 보장될 때 아이덴티티 검사가 동등성 검사를 대체할 수 있습니다. 일반적으로, 아이덴티티가 보장되는 세 " | ||
| 2263 | + "가지 상황이 있습니다:" | ||
| 2259 | 2264 | ||
| 2260 | 2265 | #: ../Doc/faq/programming.rst:1720 | |
| 2261 | 2266 | msgid "" | |
| 2262 | 2267 | "1) Assignments create new names but do not change object identity. After" | |
| 2263 | 2268 | " the assignment ``new = old``, it is guaranteed that ``new is old``." | |
| 2264 | 2269 | msgstr "" | |
| 2270 | + "1) 대입은 새 이름을 만들지 만 객체 아이덴티티를 변경하지는 않습니다. 대입 ``new = old`` 후에, ``new is " | ||
| 2271 | + "old``\\임이 보장됩니다." | ||
| 2265 | 2272 | ||
| 2266 | 2273 | #: ../Doc/faq/programming.rst:1723 | |
| 2267 | 2274 | msgid "" | |
| 2268 | 2275 | "2) Putting an object in a container that stores object references does " | |
| 2269 | 2276 | "not change object identity. After the list assignment ``s[0] = x``, it " | |
| 2270 | 2277 | "is guaranteed that ``s[0] is x``." | |
| 2271 | 2278 | msgstr "" | |
| 2279 | + "2) 객체 참조를 저장하는 컨테이너에 객체를 넣어도 객체 아이덴티티가 변경되지 않습니다. 리스트 대입 ``s[0] = x`` 후에," | ||
| 2280 | + " ``s[0] is x``\\임이 보장됩니다." | ||
| 2272 | 2281 | ||
| 2273 | 2282 | #: ../Doc/faq/programming.rst:1727 | |
| 2274 | 2283 | msgid "" | |
| 2275 | 2284 | "3) If an object is a singleton, it means that only one instance of that " | |
| 2276 | 2285 | "object can exist. After the assignments ``a = None`` and ``b = None``, " | |
| 2277 | 2286 | "it is guaranteed that ``a is b`` because ``None`` is a singleton." | |
| 2278 | 2287 | msgstr "" | |
| 2288 | + "3) 객체가 싱글톤이면, 해당 객체의 인스턴스가 하나만 존재할 수 있음을 의미합니다. ``a = None`` 과 ``b = " | ||
| 2289 | + "None`` 대입 후에 ``None``\\은 싱글톤이므로 ``a is b``\\임이 보장됩니다." | ||
| 2279 | 2290 | ||
| 2280 | 2291 | #: ../Doc/faq/programming.rst:1731 | |
| 2281 | 2292 | msgid "" | |
@@ -2284,16 +2295,18 @@ msgid "" | |||
| 2284 | 2295 | " check constants such as :class:`int` and :class:`str` which aren't " | |
| 2285 | 2296 | "guaranteed to be singletons::" | |
| 2286 | 2297 | msgstr "" | |
| 2298 | + "대부분의 다른 상황에서는 아이덴티티 검사가 권장되지 않으며 동등성 테스트가 선호됩니다. 특히, 싱글톤이 보장되지 않는 " | ||
| 2299 | + ":class:`int`\\와 :class:`str`\\과 같은 상수를 확인하는 데 아이덴티티 검사를 사용해서는 안 됩니다::" | ||
| 2287 | 2300 | ||
| 2288 | 2301 | #: ../Doc/faq/programming.rst:1748 | |
| 2289 | 2302 | msgid "Likewise, new instances of mutable containers are never identical::" | |
| 2290 | - msgstr "" | ||
| 2303 | + msgstr "마찬가지로, 가변 컨테이너의 새 인스턴스는 절대 동일하지 않습니다::" | ||
| 2291 | 2304 | ||
| 2292 | 2305 | #: ../Doc/faq/programming.rst:1755 | |
| 2293 | 2306 | msgid "" | |
| 2294 | 2307 | "In the standard library code, you will see several common patterns for " | |
| 2295 | 2308 | "correctly using identity tests:" | |
| 2296 | - msgstr "" | ||
| 2309 | + msgstr "표준 라이브러리 코드에서, 아이덴티티 검사를 올바르게 사용하는 몇 가지 일반적인 패턴을 볼 수 있습니다:" | ||
| 2297 | 2310 | ||
| 2298 | 2311 | #: ../Doc/faq/programming.rst:1758 | |
| 2299 | 2312 | msgid "" | |
@@ -2302,6 +2315,8 @@ msgid "" | |||
| 2302 | 2315 | "confusion with other objects that may have boolean values that evaluate " | |
| 2303 | 2316 | "to false." | |
| 2304 | 2317 | msgstr "" | |
| 2318 | + "1) :pep:`8`\\에서 권장하는 대로, 아이덴티티 검사는 ``None``\\을 확인하는 데 선호되는 방법입니다. 이것은 " | ||
| 2319 | + "코드에서 일반 영어처럼 읽히고 거짓으로 평가되는 불리언 값을 가질 수 있는 다른 객체와의 혼동을 방지합니다." | ||
| 2305 | 2320 | ||
| 2306 | 2321 | #: ../Doc/faq/programming.rst:1762 | |
| 2307 | 2322 | msgid "" | |
@@ -2310,19 +2325,24 @@ msgid "" | |||
| 2310 | 2325 | "object guaranteed to be distinct from other objects. For example, here " | |
| 2311 | 2326 | "is how to implement a method that behaves like :meth:`dict.pop`::" | |
| 2312 | 2327 | msgstr "" | |
| 2328 | + "2) ``None``\\이 유효한 입력값일 때 선택적 인자를 감지하는 것이 까다로울 수 있습니다. 이러한 상황에서, 다른 객체와 " | ||
| 2329 | + "구별되는 싱글톤 센티넬 객체를 만들 수 있습니다. 예를 들어, 다음은 :meth:`dict.pop`\\처럼 작동하는 메서드를 " | ||
| 2330 | + "구현하는 방법입니다::" | ||
| 2313 | 2331 | ||
| 2314 | 2332 | #: ../Doc/faq/programming.rst:1778 | |
| 2315 | 2333 | msgid "" | |
| 2316 | 2334 | "3) Container implementations sometimes need to augment equality tests " | |
| 2317 | 2335 | "with identity tests. This prevents the code from being confused by " | |
| 2318 | 2336 | "objects such as ``float('NaN')`` that are not equal to themselves." | |
| 2319 | 2337 | msgstr "" | |
| 2338 | + "3) 컨테이너 구현은 때때로 아이덴티티 검사로 동등성 검사를 강화해야 합니다. 이것은 자신과 같지 않은 " | ||
| 2339 | + "``float('NaN')``\\과 같은 객체에 의해 코드가 혼동되는 것을 방지합니다." | ||
| 2320 | 2340 | ||
| 2321 | 2341 | #: ../Doc/faq/programming.rst:1782 | |
| 2322 | 2342 | msgid "" | |
| 2323 | 2343 | "For example, here is the implementation of " | |
| 2324 | 2344 | ":meth:`collections.abc.Sequence.__contains__`::" | |
| 2325 | - msgstr "" | ||
| 2345 | + msgstr "예를 들어, 다음은 :meth:`collections.abc.Sequence.__contains__`\\의 구현입니다::" | ||
| 2326 | 2346 | ||
| 2327 | 2347 | #: ../Doc/faq/programming.rst:1793 | |
| 2328 | 2348 | msgid "Modules" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments