dsl-python 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2eb743a306a7a67f79aebdbc21f9e7a23a672b9afbebb4397af2d69b9dba83d
4
- data.tar.gz: 23d92ea3bbf42aac6db5a032546f644bed04c3d22d157c8da8643f3d9208a208
3
+ metadata.gz: febe5712a15cb8f68bb07dac949484bb607d46b283a76181a63db4ddb70d6faa
4
+ data.tar.gz: 5c1a5e28bbd0db0d972e494cb7fa9439432bc32b3869022e4d8d5ae9fac2270a
5
5
  SHA512:
6
- metadata.gz: 0aace107c890bd9b63bb5f1c8168ba4dec5d40c5a692b482107fde74286c44b08ca163b59f94bc47298809a4deb470203a6d50c2047da1bfc0604be8b67e21dd
7
- data.tar.gz: f9425130dcd7cbbf65b55d94fc137ebc826dc6ccd902da814f4177dc971ccdf7d53be28aced41b3fbb069ebc27f89cb34a1d6bd9c2b36bc135ed2284971d37a9
6
+ metadata.gz: cb22bfbef89bc09178df63299a45080f70212d60fcb0c48771c3a716f35c251b3685ebf88cdbbdd2b1ff413c2fe24433d5862400a871217b43fb06f6016565cd
7
+ data.tar.gz: 36a5c4e75e6cdf706135159229b5f6608d5e164a8468359923149713adba10d6a28449655d856f2e6b0ca2e29fdd5f7287ecebb3d0161c71aae6914cda35bc3e
data/bin/npython CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
3
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
4
4
  require "dsl/python/cli"
5
5
 
6
6
  if ARGV.size.zero?
7
- Dsl::Python::open_repl
7
+ Dsl::Python.open_repl
8
8
  elsif ["v", "-v", "--version", "-V"].include? ARGV.first
9
- Dsl::Python::show_version
9
+ Dsl::Python.show_version
10
10
  elsif ["h", "-h", "--help", "-?"].include? ARGV.first
11
- Dsl::Python::show_help
11
+ Dsl::Python.show_help
12
12
  else
13
- Dsl::Python::run_program ARGV.first
13
+ run_program ARGV.first
14
14
  end
@@ -0,0 +1,109 @@
1
+
2
+ # PiByrras 202605
3
+
4
+ * Abrir REPL python3 y npython
5
+
6
+ ```
7
+ name = "Obiwan"
8
+ len(name)
9
+ type(name)
10
+ name.__len__()
11
+
12
+ >>> name = name + " Kenobi"
13
+ >>> name
14
+ 'Obiwan Kenobi'
15
+ >>> name = name.__add__(" Kenobi")
16
+ >>> name
17
+ 'Obiwan Kenobi Kenobi'
18
+ >>> print(name)
19
+ Obiwan Kenobi Kenobi
20
+ >>> len(name)
21
+ 20
22
+ >>>
23
+ True
24
+ >>> id(16)
25
+ 140717975471496
26
+ >>> id(16)
27
+ 140717975471496
28
+ >>> id(16)
29
+ 140717975471496
30
+ >>> id(256)
31
+ 140717975479176
32
+ >>> id(256)
33
+ 140717975479176
34
+ >>> id(257)
35
+ 2647436846352
36
+ >>> id(257)
37
+ 2647436845104
38
+ >>> id(257)
39
+ 2647436845232
40
+ >>> id(257)
41
+ 2647436845328
42
+ >>> a = "obiwan"
43
+ >>> b = "obiwan"
44
+ >>> id(a)
45
+ 2647432805904
46
+ >>> id(b)
47
+ 2647432805904
48
+ >>>
49
+
50
+ --
51
+ Crear método .__ para "mostrar" todos los métodos "ocultos" de broma.
52
+ crear función id que invoque a object_id.
53
+ ---
54
+ Trabajar con las clases:
55
+ crear un alias de initialize a __init__... es posible?
56
+ hacer metaprogramación para self.name= name
57
+ cree @name = name
58
+
59
+ >>> class Persona:
60
+ ...     def __init__(self, name, age):
61
+ ...         self.name = name
62
+ ...         self.age = age
63
+ ...
64
+ >>> obiwan = Persona("Obiwan")
65
+ Traceback (most recent call last):
66
+   File "<python-input-59>", line 1, in <module>
67
+     obiwan = Persona("Obiwan")
68
+ TypeError: Persona.__init__() missing 1 required positional argument: 'age'
69
+ >>> obiwan = Persona("Obiwan", 55)
70
+ >>> print(obiwan)
71
+ <__main__.Persona object at 0x000002686780A210>
72
+
73
+ >>> type(obiwan)
74
+ <class '__main__.Persona'>
75
+ >>>
76
+
77
+ ---
78
+ >>> type(obiwan)
79
+ <class '__main__.Persona'>
80
+ >>> class Persona:
81
+ ...     class Persona:
82
+ ...         print("hola")
83
+ ...
84
+ hola
85
+ >>> class Persona:
86
+ ...     class Persona:
87
+ ...         print("hola")
88
+ ...     a = Persona()
89
+ ...     print(a)
90
+ ...     print(type(a))
91
+ ...
92
+ hola
93
+ <__main__.Persona.Persona object at 0x00000268678A86E0>
94
+ <class '__main__.Persona.Persona'>
95
+
96
+ ---
97
+
98
+ >>> obiwan.age
99
+ 55
100
+ >>> obiwan.age= 56
101
+ >>> obiwan.age
102
+ 56
103
+ >>> if obiwan.age > 18:
104
+ ...     print("Adulto")
105
+ ...
106
+ Adulto
107
+ >>>
108
+ --
109
+ ```
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "io/console"
3
4
 
4
5
  # Códigos ANSI de color:
@@ -51,22 +52,26 @@ class ANSI
51
52
  print "\e[0m"
52
53
  end
53
54
 
54
- def self.print_text_at(row, col, text)
55
+ def self.print_text_at(row, col, text)
55
56
  print "\033[#{row + 1};#{col}H"
56
57
  print text
57
58
  print "\e[0m"
58
59
  end
59
60
 
60
61
  def self.pressed_key
61
- char = STDIN.read_nonblock(3) rescue nil
62
+ char = begin
63
+ STDIN.read_nonblock(3)
64
+ rescue
65
+ nil
66
+ end
62
67
  return nil unless char
63
-
68
+
64
69
  case char
65
70
  when "\e[A" then :up
66
71
  when "\e[B" then :down
67
72
  when "\e[C" then :right
68
73
  when "\e[D" then :left
69
- when "q" then :quit
74
+ when "q" then :quit
70
75
  else char
71
76
  end
72
77
  end
@@ -80,4 +85,4 @@ class ANSI
80
85
  STDIN.cooked!
81
86
  STDIN.echo = true
82
87
  end
83
- end
88
+ end
@@ -7,39 +7,39 @@ module Dsl
7
7
  module Python
8
8
  def self.open_repl
9
9
  text = <<~TEXT
10
- nPython #{VERSION} (main, Nov 16 1970) [GCC] on linux
11
- Type "help", "copyright", "credits" or "license" for more information.
10
+ nPython #{VERSION} (main, Nov 16 1970) [GCC] on linux
11
+ Type "help", "copyright", "credits" or "license" for more information.
12
12
  TEXT
13
13
  puts text
14
14
  system("irb --nobanner --prompt simple --nocolorize --noecho-on-assignment -Ilib -rdsl/python")
15
15
  end
16
-
16
+
17
17
  def self.show_version
18
18
  puts "npython #{VERSION}"
19
19
  end
20
-
20
+
21
21
  def self.show_help
22
22
  text = <<~TEXT
23
- usage: npython [option | file ]
24
- Options:
25
- -h : print this help message and exit (also -? or --help)
26
- -v : show current version (also -V or --version)
27
-
28
- Arguments:
29
- file : program read from script file
23
+ usage: npython [option | file ]
24
+ Options:
25
+ -h : print this help message and exit (also -? or --help)
26
+ -v : show current version (also -V or --version)
27
+
28
+ Arguments:
29
+ file : program read from script file
30
30
  TEXT
31
- puts text
31
+ puts text
32
32
  end
33
-
34
- def self.run_program(name)
35
- unless File.exist? name
36
- puts "npython: can't open file '#{name}': [Errno 2] No such file or directory"
37
- exit 1
38
- end
39
-
40
- content = File.read(name)
41
- eval(content)
42
- end
43
33
  end
44
34
  end
45
35
 
36
+ def run_program(filepath)
37
+ unless File.exist? filepath
38
+ puts "npython: can't open file '#{filepath}': [Errno 2] No such file or directory"
39
+ exit 1
40
+ end
41
+
42
+ $main_filepath = filepath
43
+ content = File.read(filepath)
44
+ eval(content)
45
+ end
@@ -1,7 +1,6 @@
1
-
2
1
  def len(obj)
3
2
  if obj.respond_to?(:length)
4
- obj.length
3
+ obj.length
5
4
  elsif obj.respond_to?(:count)
6
5
  obj.count
7
6
  elsif obj.respond_to?(:size)
@@ -13,4 +12,4 @@ end
13
12
 
14
13
  def id(obj)
15
14
  obj.object_id
16
- end
15
+ end
@@ -2,15 +2,22 @@
2
2
 
3
3
  require_relative "../repl/zen"
4
4
 
5
- def import(name)
6
- fullname = name.to_s + ".py"
7
- if name.to_s == "this"
8
- Dsl::Python::show_zen
9
- elsif name.to_s == "that"
10
- Dsl::Python::show_zen(ofuscate: true)
11
- elsif File.exist? name
12
- load name
5
+ $main_binding = binding
6
+
7
+ def import(filename)
8
+ filename.to_s
9
+ dirbase = File.dirname($main_filepath)
10
+ filepath = File.join(dirbase, filename + ".py")
11
+
12
+ if filename.to_s == "this"
13
+ Dsl::Python.show_zen
14
+ elsif filename.to_s == "that"
15
+ Dsl::Python.show_zen(ofuscate: true)
16
+ elsif File.exist? filepath
17
+
18
+ content = File.read(filepath)
19
+ eval(content, $main_binding)
13
20
  else
14
- puts "npython: can't open file '#{name}': [Errno 2] No such file or directory"
21
+ puts "npython: can't open file '#{filepath}': [Errno 2] No such file or directory"
15
22
  end
16
23
  end
@@ -7,4 +7,3 @@
7
7
  # instancia = Persona()
8
8
  # print(instancia.saludar()) # Resultado: ¡Hola!
9
9
  # print(type(instancia)) # Resultado: <class '__main__.Persona'>
10
-
@@ -1,11 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- def copyright()
3
+ def copyright
4
4
  text = <<~TEXT
5
- Copyright (c) 2025-2025 nPython Software Foundation.
6
- All Rights Reserved.
5
+ Copyright (c) 2025-2025 nPython Software Foundation.
6
+ All Rights Reserved.
7
7
  TEXT
8
8
  puts text
9
9
  "(Copyright)"
10
10
  end
11
-
@@ -1,11 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- def credits()
3
+ def credits
4
4
  text = <<~TEXT
5
- Thanks to Free Software, Yukuhiro Matzumoto, David Vargas Ruiz
6
- and a cast of thousands for supporting nPython
7
- development. See github.com/dvarrui/dsl-python for more information.
5
+ Thanks to Free Software, Yukuhiro Matzumoto, David Vargas Ruiz
6
+ and a cast of thousands for supporting nPython development.
7
+ See 'github.com/dvarrui/dsl-python' for more information.
8
8
  TEXT
9
9
  puts text
10
- "(Credits)"
11
10
  end
@@ -16,8 +16,8 @@ def whereareyou
16
16
  end
17
17
 
18
18
  def bye
19
- puts ''
19
+ puts ""
20
20
  system("figlet 'I love Ruby'")
21
- puts ''
21
+ puts ""
22
22
  exit
23
- end
23
+ end
@@ -1,65 +1,64 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- def license()
3
+ def license
4
4
  text = <<~TEXT
5
- nPython is copyrighted free software by David Vargas Ruiz <dvarrui@proton.me>.
6
- You can redistribute it and/or modify it under either the terms of the
7
- 2-clause BSDL (see the file BSDL), or the conditions below:
8
-
9
- 1. You may make and give away verbatim copies of the source form of the
10
- software without restriction, provided that you duplicate all of the
11
- original copyright notices and associated disclaimers.
12
-
13
- 2. You may modify your copy of the software in any way, provided that
14
- you do at least ONE of the following:
15
-
16
- a) place your modifications in the Public Domain or otherwise
17
- make them Freely Available, such as by posting said
18
- modifications to Usenet or an equivalent medium, or by allowing
19
- the author to include your modifications in the software.
20
-
21
- b) use the modified software only within your corporation or
22
- organization.
23
-
24
- c) give non-standard binaries non-standard names, with
25
- instructions on where to get the original software distribution.
26
-
27
- d) make other distribution arrangements with the author.
28
-
29
- 3. You may distribute the software in object code or binary form,
30
- provided that you do at least ONE of the following:
31
-
32
- a) distribute the binaries and library files of the software,
33
- together with instructions (in the manual page or equivalent)
34
- on where to get the original distribution.
35
-
36
- b) accompany the distribution with the machine-readable source of
37
- the software.
38
-
39
- c) give non-standard binaries non-standard names, with
40
- instructions on where to get the original software distribution.
41
-
42
- d) make other distribution arrangements with the author.
43
-
44
- 4. You may modify and include the part of the software into any other
45
- software (possibly commercial). But some files in the distribution
46
- are not written by the author, so that they are not under these terms.
47
-
48
- For the list of those files and their copying conditions, see the
49
- file LEGAL.
50
-
51
- 5. The scripts and library files supplied as input to or produced as
52
- output from the software do not automatically fall under the
53
- copyright of the software, but belong to whomever generated them,
54
- and may be sold commercially, and may be aggregated with this
55
- software.
56
-
57
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
58
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
59
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
60
- PURPOSE.
5
+ nPython is copyrighted free software by David Vargas Ruiz <dvarrui@proton.me>.
6
+ You can redistribute it and/or modify it under either the terms of the
7
+ 2-clause BSDL (see the file BSDL), or the conditions below:
8
+
9
+ 1. You may make and give away verbatim copies of the source form of the
10
+ software without restriction, provided that you duplicate all of the
11
+ original copyright notices and associated disclaimers.
12
+
13
+ 2. You may modify your copy of the software in any way, provided that
14
+ you do at least ONE of the following:
15
+
16
+ a) place your modifications in the Public Domain or otherwise
17
+ make them Freely Available, such as by posting said
18
+ modifications to Usenet or an equivalent medium, or by allowing
19
+ the author to include your modifications in the software.
20
+
21
+ b) use the modified software only within your corporation or
22
+ organization.
23
+
24
+ c) give non-standard binaries non-standard names, with
25
+ instructions on where to get the original software distribution.
26
+
27
+ d) make other distribution arrangements with the author.
28
+
29
+ 3. You may distribute the software in object code or binary form,
30
+ provided that you do at least ONE of the following:
31
+
32
+ a) distribute the binaries and library files of the software,
33
+ together with instructions (in the manual page or equivalent)
34
+ on where to get the original distribution.
35
+
36
+ b) accompany the distribution with the machine-readable source of
37
+ the software.
38
+
39
+ c) give non-standard binaries non-standard names, with
40
+ instructions on where to get the original software distribution.
41
+
42
+ d) make other distribution arrangements with the author.
43
+
44
+ 4. You may modify and include the part of the software into any other
45
+ software (possibly commercial). But some files in the distribution
46
+ are not written by the author, so that they are not under these terms.
47
+
48
+ For the list of those files and their copying conditions, see the
49
+ file LEGAL.
50
+
51
+ 5. The scripts and library files supplied as input to or produced as
52
+ output from the software do not automatically fall under the
53
+ copyright of the software, but belong to whomever generated them,
54
+ and may be sold commercially, and may be aggregated with this
55
+ software.
56
+
57
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
58
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
59
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
60
+ PURPOSE.
61
61
  TEXT
62
62
  puts text
63
63
  "(License)"
64
64
  end
65
-
@@ -11,31 +11,31 @@ def that
11
11
  end
12
12
 
13
13
  def zen
14
- Dsl::Python::show_zen
14
+ Dsl::Python.show_zen
15
15
  end
16
16
 
17
17
  module Dsl
18
18
  module Python
19
19
  def self.show_zen(ofuscate: false)
20
20
  text = <<~TEXT
21
- El Zen de nPython (Inspirado por Matz)
21
+ El Zen de nPython (Inspirado por Matz)
22
22
 
23
- 1. La felicidad del programador es el fin último.
24
- 2. Lo natural es mejor que lo explícito.
25
- 3. La libertad es mejor que la restricción.
26
- 4. La elegancia supera a la brevedad.
27
- 5. Muchos caminos son mejores que uno solo (TIMTOWTDI).
28
- 6. Si el código se lee como prosa, es buen código.
29
- 7. No castigues al programador por ser inteligente.
30
- 8. La pureza del objeto es sagrada.
31
- 9. La metaprogramación es un superpoder, úsalo con sabiduría.
32
- 10. El lenguaje debe adaptarse al humano, no el humano al lenguaje.
33
- 11. Un bloque es a menudo la respuesta.
34
- 12. Los símbolos son mejores que los strings para la identidad.
35
- 13. El principio de Menor Sorpresa es subjetivo, pero vital.
36
- 14. Si te hace sonreír al escribirlo, es Ruby.
23
+ 1. La felicidad del programador es el fin último.
24
+ 2. Lo natural es mejor que lo explícito.
25
+ 3. La libertad es mejor que la restricción.
26
+ 4. La elegancia supera a la brevedad.
27
+ 5. Muchos caminos son mejores que uno solo (TIMTOWTDI).
28
+ 6. Si el código se lee como prosa, es buen código.
29
+ 7. No castigues al programador por ser inteligente.
30
+ 8. La pureza del objeto es sagrada.
31
+ 9. La metaprogramación es un superpoder, úsalo con sabiduría.
32
+ 10. El lenguaje debe adaptarse al humano, no el humano al lenguaje.
33
+ 11. Un bloque es a menudo la respuesta.
34
+ 12. Los símbolos son mejores que los strings para la identidad.
35
+ 13. El principio de Menor Sorpresa es subjetivo, pero vital.
36
+ 14. Si te hace sonreír al escribirlo, es Ruby.
37
37
  TEXT
38
-
38
+
39
39
  lines = text.split("\n")
40
40
  lines.each_with_index do |line, index|
41
41
  if line.empty?
@@ -43,16 +43,16 @@ module Dsl
43
43
  next
44
44
  end
45
45
  words = line.split
46
- if index.zero?
47
- index = words.shift
46
+ index = if index.zero?
47
+ words.shift
48
48
  else
49
- index = ANSI.new.green(words.shift)
49
+ ANSI.new.green(words.shift)
50
50
  end
51
51
  text = words.join(" ")
52
- text = text.gsub(/[^\d\s]/, '*') if ofuscate
52
+ text = text.gsub(/[^\d\s]/, "*") if ofuscate
53
53
  puts " #{index} #{text}"
54
54
  end
55
55
  nil
56
- end
56
+ end
57
57
  end
58
58
  end
@@ -13,11 +13,10 @@ class Array
13
13
  list.__doc__ list.__imul__( list.__reduce__()
14
14
  list.__eq__( list.__init__( list.__reduce_ex__(
15
15
  list.__format__( list.__init_subclass__() list.__repr__()
16
- METHODS
16
+ METHODS
17
17
  end
18
18
 
19
19
  def to_s
20
- self.inspect.to_s
20
+ inspect
21
21
  end
22
22
  end
23
-
@@ -10,4 +10,3 @@ end
10
10
 
11
11
  True = true
12
12
  False = false
13
-
@@ -2,7 +2,7 @@
2
2
 
3
3
  class Hash
4
4
  def to_s
5
- values = self.map do
5
+ values = map do
6
6
  value1 = _1
7
7
  value1 = "'#{_1}'" if _1.is_a? String
8
8
  value2 = _2
@@ -2,21 +2,21 @@
2
2
 
3
3
  class Integer
4
4
  def __
5
- puts <<-TEXT
6
- int.__abs__() int.__floordiv__( int.__le__( int.__rdivmod__( int.__rsub__(
7
- int.__add__( int.__format__( int.__lshift__( int.__reduce__() int.__rtruediv__(
8
- int.__and__( int.__ge__( int.__lt__( int.__reduce_ex__( int.__rxor__(
9
- int.__bool__() int.__getattribute__( int.__mod__( int.__repr__() int.__setattr__(
10
- int.__ceil__() int.__getnewargs__() int.__mul__( int.__rfloordiv__( int.__sizeof__()
11
- int.__class__( int.__getstate__() int.__ne__( int.__rlshift__( int.__str__()
12
- int.__delattr__( int.__gt__( int.__neg__() int.__rmod__( int.__sub__(
13
- int.__dir__() int.__hash__() int.__new__( int.__rmul__( int.__subclasshook__(
14
- int.__divmod__( int.__index__() int.__or__( int.__ror__( int.__truediv__(
15
- int.__doc__ int.__init__( int.__pos__() int.__round__( int.__trunc__()
16
- int.__eq__( int.__init_subclass__() int.__pow__( int.__rpow__( int.__xor__(
17
- int.__float__() int.__int__() int.__radd__( int.__rrshift__(
18
- int.__floor__() int.__invert__() int.__rand__( int.__rshift__(
19
- TEXT
5
+ puts <<~TEXT
6
+ int.__abs__() int.__floordiv__( int.__le__( int.__rdivmod__( int.__rsub__(
7
+ int.__add__( int.__format__( int.__lshift__( int.__reduce__() int.__rtruediv__(
8
+ int.__and__( int.__ge__( int.__lt__( int.__reduce_ex__( int.__rxor__(
9
+ int.__bool__() int.__getattribute__( int.__mod__( int.__repr__() int.__setattr__(
10
+ int.__ceil__() int.__getnewargs__() int.__mul__( int.__rfloordiv__( int.__sizeof__()
11
+ int.__class__( int.__getstate__() int.__ne__( int.__rlshift__( int.__str__()
12
+ int.__delattr__( int.__gt__( int.__neg__() int.__rmod__( int.__sub__(
13
+ int.__dir__() int.__hash__() int.__new__( int.__rmul__( int.__subclasshook__(
14
+ int.__divmod__( int.__index__() int.__or__( int.__ror__( int.__truediv__(
15
+ int.__doc__ int.__init__( int.__pos__() int.__round__( int.__trunc__()
16
+ int.__eq__( int.__init_subclass__() int.__pow__( int.__rpow__( int.__xor__(
17
+ int.__float__() int.__int__() int.__radd__( int.__rrshift__(
18
+ int.__floor__() int.__invert__() int.__rand__( int.__rshift__(
19
+ TEXT
20
20
  end
21
21
 
22
22
  def __add__(other)
@@ -34,4 +34,4 @@ int.__floor__() int.__invert__() int.__rand__( int._
34
34
  def __sub__(other)
35
35
  self - other
36
36
  end
37
- end
37
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  def range(value)
4
- Range.new(0,value - 1)
4
+ Range.new(0, value - 1)
5
5
  end
@@ -1,4 +1,3 @@
1
-
2
1
  class String
3
2
  def format(arg)
4
3
  self % arg
@@ -9,26 +8,26 @@ class String
9
8
  end
10
9
 
11
10
  def lower
12
- self.downcase
11
+ downcase
13
12
  end
14
13
 
15
14
  def upper
16
- self.upcase
15
+ upcase
17
16
  end
18
17
 
19
18
  def replace(a, b)
20
- self.tr(a, b)
19
+ tr(a, b)
21
20
  end
22
21
 
23
22
  def __
24
- puts " str.__add__( str.__getattribute__( str.__le__( str.__repr__()
25
- str.__class__( str.__getitem__( str.__len__() str.__rmod__(
26
- str.__contains__( str.__getnewargs__() str.__lt__( str.__rmul__(
27
- str.__delattr__( str.__getstate__() str.__mod__( str.__setattr__(
28
- str.__dir__() str.__gt__( str.__mul__( str.__sizeof__()
29
- str.__doc__ str.__hash__() str.__ne__( str.__str__()
30
- str.__eq__( str.__init__( str.__new__( str.__subclasshook__(
31
- str.__format__( str.__init_subclass__() str.__reduce__()
23
+ puts " str.__add__( str.__getattribute__( str.__le__( str.__repr__()
24
+ str.__class__( str.__getitem__( str.__len__() str.__rmod__(
25
+ str.__contains__( str.__getnewargs__() str.__lt__( str.__rmul__(
26
+ str.__delattr__( str.__getstate__() str.__mod__( str.__setattr__(
27
+ str.__dir__() str.__gt__( str.__mul__( str.__sizeof__()
28
+ str.__doc__ str.__hash__() str.__ne__( str.__str__()
29
+ str.__eq__( str.__init__( str.__new__( str.__subclasshook__(
30
+ str.__format__( str.__init_subclass__() str.__reduce__()
32
31
  str.__ge__( str.__iter__() str.__reduce_ex__( "
33
32
  end
34
33
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  module Dsl
4
4
  module Python
5
- VERSION="0.18.0"
5
+ VERSION = "0.19.0"
6
6
  end
7
7
  end
8
8
 
9
- def version()
9
+ def version
10
10
  puts Dsl::Python::VERSION
11
11
  "(Version)"
12
12
  end
data/lib/dsl/python.rb CHANGED
@@ -23,16 +23,15 @@ require_relative "python/version"
23
23
  def print(*args)
24
24
  if args.is_a? Array
25
25
  if args.count == 1
26
- puts args.first.to_s
26
+ puts args.first
27
27
  else
28
- puts args.join " "
28
+ puts args.join " "
29
29
  end
30
30
  else
31
31
  puts(args)
32
32
  end
33
33
  end
34
34
 
35
-
36
35
  module Dsl
37
36
  module Python
38
37
  class Error < StandardError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsl-python
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
@@ -18,10 +18,12 @@ extensions: []
18
18
  extra_rdoc_files:
19
19
  - LICENSE
20
20
  - README.md
21
+ - docs/pybirras-2026.md
21
22
  files:
22
23
  - LICENSE
23
24
  - README.md
24
25
  - bin/npython
26
+ - docs/pybirras-2026.md
25
27
  - lib/dsl/python.rb
26
28
  - lib/dsl/python/ansi.rb
27
29
  - lib/dsl/python/cli.rb