Messaging a Python String Object

Sdílet
Vložit
  • čas přidán 16. 07. 2024
  • Shows how a message in a Python program invokes an object's method.

Komentáře • 23

  • @fadilyassin4597
    @fadilyassin4597 Před rokem +2

    honestly I can't find words to express how good you are I have seen a lot of python tutorials on youtube udemy corseara no one no one atall have your talent in explaining python to beginers as you do I wish I have the means to let every one who wants to learn python to see your videos you ar a 10 star tutor yes 10 excellent work thank you

    • @johnphilipjones
      @johnphilipjones  Před rokem

      Thank you for your generous comments it is appreciated.
      Best wishes
      Phil
      (John Philip Jones)

  • @john-junkarsan4671
    @john-junkarsan4671 Před 5 lety +6

    AMAZING TEACHING. VERY ENJOY SUCH PROFUND EXPLANNATION ABOUT PROGRAMMING! EXCELLENT WORK! THANKS MR. JONES!

  • @LonglongGuitar
    @LonglongGuitar Před 7 lety +3

    the smartest and clearest tutorial on this earth !!!

  • @serjmaster87
    @serjmaster87 Před 8 lety +8

    best teacher ever !

    • @johnphilipjones
      @johnphilipjones  Před 8 lety +1

      +sergey gordjei Thank you check out the following:
      www.pythonbytesize.com/
      Regards
      Phil

  • @richardmakiya7188
    @richardmakiya7188 Před 4 měsíci +1

    Ahora recién entiendo por qué el creador de la POO se lamenta haber nombrado a este paradigma de programación como orientada a objeto cuando debió nombrarla ORIENTADA A MENSAJES!!! Muchas Gracias!!!!

    • @johnphilipjones
      @johnphilipjones  Před 3 měsíci +1

      I suspect they called it object-oriented because systems are analyzed/designed around concepts which can be implemented as class diagrams from which objects are created. These objects then communicate by sending messages.
      Best wishes Phil

  • @yosoyelfonsi
    @yosoyelfonsi Před 4 lety +2

    amazing teaching thankyou

  • @davidochieng1443
    @davidochieng1443 Před rokem +2

    How I love this guy!

  • @shrey5341
    @shrey5341 Před 5 lety

    Can you pleas post a sequence of these videos which tells us in which order we should go through them for the OOP playlist. I see after video 2 I had to come straight to video 8

    • @johnphilipjones
      @johnphilipjones  Před 5 lety

      I recommend that you view the videos on the supporting website where they are more easily ordered. See the following link: www.PythonByteSize.com

  • @MaxGoddur
    @MaxGoddur Před 7 lety

    In video 60 at 8:31 you start with a new concept in which Objects can message other objects but here in this video there is no sign of where the message(split()) is coming from I expected to see as a source an object and and destination object in the diagram, keeping with the flow of your model, is there something I missed?

    • @johnphilipjones
      @johnphilipjones  Před 7 lety +1

      words = welcome.split()
      On the right side of the assignment sign (equal sign) you have a message. A message is made up of the name of the object and the method to be invoked.
      welcome is the object and split() is the method to be invoked.
      split() is a method defined in the string class
      welcome is an instance (i.e an object) of the string class
      When you write a program there always has to be a first program statement that executes. This first statement is usually in a function (called main()) even if it is not apparent in the code. This first statement does not have to be part of an object. Also you can mix object oriented programming with procedural programming.

    • @MaxGoddur
      @MaxGoddur Před 7 lety

      Will digest thank you so much

  • @sadipiralabasireddy5141

    In this video, at 12:55 , in the piece of code, does the words=welcome.split() creates an another Object in the execution space as the result of the welcome.split() has been assigned ?

  • @pardeepsangruri
    @pardeepsangruri Před 5 lety

    hi phil, what if the split method is not assigned to the word. Where does it go

    • @johnphilipjones
      @johnphilipjones  Před 5 lety

      The method split() will have been designed to return a value. The value will be a list structure whose elements are strings. As it returns a value there must be something that will store what is returned. In this case words is the name bound to the list (i.e. it 'stores' what is returned).

  • @zeeshanakram8751
    @zeeshanakram8751 Před 6 lety

    Hello Sir!
    Here i am giving reference of an error message:
    AttributeError: 'int' object has no attribute 'split'
    my question is:
    why python is saying"object" to 'int' and "attribute" to 'split' here ? according to my understanding which i gain from your videos that, 'int' is a class, not object, and split is a behaviour/method, not attribute.

    • @johnphilipjones
      @johnphilipjones  Před 6 lety +1

      Object oriented programs generically regard a class as defining attributes and behaviours. Behaviours are implemented by methods (i.e. functions) and attributes are essentially variables. However, Python in their documents calls both attributes and methods, attributes. This can be very confusing. It is just a question of realizing that in the Python world the use of the language to describe methods and attributes is different to other OOP languages.