Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for kname (0.14 sec)

  1. doc/go_spec.html

    }
    </pre>
    
    <p>
    A field declared with a type but no explicit field name is called an <i>embedded field</i>.
    An embedded field must be specified as
    a type name <code>T</code> or as a pointer to a non-interface type name <code>*T</code>,
    and <code>T</code> itself may not be
    a pointer type. The unqualified type name acts as the field name.
    </p>
    
    <pre>
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
  2. docs/en/docs/release-notes.md

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    @app.get("/items/")
    async def read_items() -> list[Item]:
        return [
            Item(name="Portal Gun", price=42.0),
            Item(name="Plumbus", price=32.0),
        ]
    ```
    
    FastAPI will use the return type annotation to perform:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
Back to top