Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 150 for PRINT (0.02 seconds)

  1. scripts/translate.py

                continue
            missing_paths.append(p)
        print("Paths to skip:")
        for p in skipped_paths:
            print(f"  - {p}")
        print(f"Total paths to skip: {len(skipped_paths)}")
        print("Paths to process:")
        for p in missing_paths:
            print(f"  - {p}")
        print(f"Total paths to process: {len(missing_paths)}")
        for p in missing_paths:
            print(f"Translating: {p}")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:37:41 GMT 2026
    - 15.8K bytes
    - Click Count (0)
  2. scripts/tests/test_translation_fixer/test_complex_doc/data/en_doc.md

    ```python
    #Function declaration
    def hello_world():# Print greeting
        print("Hello, world!")  #Print greeting without space after hash
    ```
    
    ```console
    //Function declaration
    def hello_world():// Print greeting
        print("Hello, world!")  //Print greeting without space after slashes
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 08:08:04 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  3. docs_src/custom_request_and_route/tutorial003_py310.py

                duration = time.time() - before
                response.headers["X-Response-Time"] = str(duration)
                print(f"route duration: {duration}")
                print(f"route response: {response}")
                print(f"route response headers: {response.headers}")
                return response
    
            return custom_route_handler
    
    
    app = FastAPI()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 1K bytes
    - Click Count (0)
  4. logger/logger.go

    	newlogger := *l
    	newlogger.LogLevel = level
    	return &newlogger
    }
    
    // Info print info
    func (l *logger) Info(ctx context.Context, msg string, data ...interface{}) {
    	if l.LogLevel >= Info {
    		l.Printf(l.infoStr+msg, append([]interface{}{utils.FileWithLineNum()}, data...)...)
    	}
    }
    
    // Warn print warn messages
    func (l *logger) Warn(ctx context.Context, msg string, data ...interface{}) {
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:35:55 GMT 2026
    - 6.3K bytes
    - Click Count (0)
  5. scripts/docs.py

        new_content = generate_readme_content()
        if new_content != old_content:
            print("README.md outdated from the latest index.md")
            print("Updating README.md")
            readme_path.write_text(new_content, encoding="utf-8")
            raise typer.Exit(1)
        print("README.md is up to date ✅")
    
    
    @app.command()
    def build_all() -> None:
        """
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 17:46:10 GMT 2026
    - 25.4K bytes
    - Click Count (0)
  6. docs_src/handling_errors/tutorial006_py310.py

    
    @app.exception_handler(StarletteHTTPException)
    async def custom_http_exception_handler(request, exc):
        print(f"OMG! An HTTP error!: {repr(exc)}")
        return await http_exception_handler(request, exc)
    
    
    @app.exception_handler(RequestValidationError)
    async def validation_exception_handler(request, exc):
        print(f"OMG! The client sent invalid data!: {exc}")
        return await request_validation_exception_handler(request, exc)
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 928 bytes
    - Click Count (0)
  7. docs/ko/docs/advanced/advanced-python-types.md

    예를 들어, 어떤 값이 `str` 또는 `None`이 될 수 있다고 선언할 수 있습니다:
    
    ```python
    from typing import Union
    
    
    def say_hi(name: Union[str, None]):
            print(f"Hi {name}!")
    ```
    
    `typing`에는 `None`이 될 수 있음을 선언하는 축약형으로 `Optional`도 있습니다.
    
    아주 개인적인 관점에서의 팁입니다:
    
    - 🚨 `Optional[SomeType]` 사용은 피하세요
    - 대신 ✨ **`Union[SomeType, None]`를 사용하세요** ✨.
    
    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)
  8. configure.py

        if user_input == 'y':
          print(yes_reply)
          var = True
        elif user_input == 'n':
          print(no_reply)
          var = False
        elif not user_input:
          if enabled_by_default:
            print(yes_reply)
            var = True
          else:
            print(no_reply)
            var = False
        else:
          print('Invalid selection: {}'.format(user_input_origin))
      return var
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Fri Dec 19 16:32:04 GMT 2025
    - 48.3K bytes
    - Click Count (0)
  9. scripts/tests/test_translation_fixer/test_code_blocks/data/translated_doc_mermaid_translated.md

    # Code blocks { #code-blocks }
    
    Some text
    
    ```python
    # This is a sample Python code block
    def hello_world():
        # Comment with indentation
        print("Hello, world!")  # Print greeting
    ```
    
    Some more text
    
    ```toml
    # This is a sample TOML code block
    title = "TOML Example"  # Title of the document
    ```
    
    And more text
    
    ```console
    // Use the command "live" and pass the language code as a CLI argument
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Jan 10 21:48:08 GMT 2026
    - 889 bytes
    - Click Count (0)
  10. docs/zh/docs/advanced/advanced-python-types.md

    def say_hi(name: Optional[str]):
        print(f"Hey {name}!")
    ```
    
    参数 `name` 被定义为 `Optional[str]`,但它并不是“可选”的,你不能不传这个参数就调用函数:
    
    ```Python
    say_hi()  # 哎呀,这会报错!😱
    ```
    
    参数 `name` 仍然是必填的(不是“可选”),因为它没有默认值。不过,`name` 接受 `None` 作为取值:
    
    ```Python
    say_hi(name=None)  # 这样可以,None 是有效的 🎉
    ```
    
    好消息是,在大多数情况下,你可以直接使用 `|` 来定义类型联合:
    
    ```python
    def say_hi(name: str | None):
        print(f"Hey {name}!")
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:37:57 GMT 2026
    - 2K bytes
    - Click Count (0)
Back to Top