About 19,300,000 results
Open links in new tab
  1. Default arguments with *args and **kwargs - Stack Overflow

    In Python 2.x (I use 2.7), which is the proper way to use default arguments with *args and **kwargs? I've found a question on SO related to this topic, but that is for Python 3: Calling a …

  2. c++ - What does int argc, char *argv [] mean? - Stack Overflow

    The variables are named argc (argument count) and argv (argument vector) by convention, but they can be given any valid identifier: int main(int num_args, char** arg_strings) is equally valid.

  3. How can I pass a list as a command-line argument with argparse?

    I am trying to pass a list as an argument to a command line program. Is there an argparse option to pass a list as option? parser.add_argument('-l', '--list', type=list, acti...

  4. python - Use of *args and **kwargs - Stack Overflow

    The syntax is the * and **. The names *args and **kwargs are only by convention but there's no hard requirement to use them. You would use *args when you're not sure how many …

  5. docker - Using ARG and ENV in Dockerfile - Stack Overflow

    Feb 28, 2020 · ARG before the first FROM are only useful to allow variables in the FROM line and to supply defaults, but can't be used otherwise. This is further discussed under Understand …

  6. How to pass arguments to a Dockerfile? - Stack Overflow

    I am using RUN instruction within a Dockerfile to install a rpm RUN yum -y install samplerpm-2.3 However, I want to pass the value "2.3" as an argument. My RUN instruction should look …

  7. How to get an environment variable value into Dockerfile during …

    Mar 19, 2019 · The ARG defines a variable to be used inside the dockerfile in subsequent commands. The ENV defines an environment variable which is passed to the container.

  8. How to define build-args in docker-compose? - Stack Overflow

    This answer is very useful, it actually shows how docker-compose can be used with --build-arg on command-line, you can define your ARG in Dockerfile, docker-compose.yml - the :args array …

  9. Type annotations for *args and **kwargs - Stack Overflow

    May 4, 2016 · I'm trying out Python's type annotations with abstract base classes to write some interfaces. Is there a way to annotate the possible types of *args and **kwargs? For example, …

  10. Dockerfile if else condition with external arguments

    Apr 27, 2017 · Accepted answer does not cover "if else condition" part of the question. Would be better to rename it to "Dockerfile with external arguments" if condition check didn't mean to be …